https://github.com/cran/MuMIn
Raw File
Tip revision: 4b49b56bb9ac3e480120119fbc1e69bba4f82259 authored by Kamil BartoĊ„ on 18 October 2013, 17:09:54 UTC
version 1.9.11
Tip revision: 4b49b56
beta.weights.R
`beta.weights` <-
function(model) {
	response.sd <- sd(model.response(model.frame(model)))
	msd <- apply(model.matrix(model), 2L, sd)
	bx <- msd / response.sd

	coefmat <- coefTable(model)[, 1L:2L, drop = FALSE]
	ret <- cbind(coefmat, coefmat * bx)
	dimnames(ret) <- list(names(model$coefficients),
		c("Estimate", "Std. Error", "Beta", "Std. Err. Beta"))
	return (ret)
}
back to top