https://github.com/cran/MuMIn
Raw File
Tip revision: f8469f452d8a1be30d399d978de9550b4632bb51 authored by Kamil BartoĊ„ on 31 January 2012, 16:44:51 UTC
version 1.7.2
Tip revision: f8469f4
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]
	ret <- cbind(coefmat, coefmat * bx)
	dimnames(ret) <- list(names(model$coefficients),
		c("Estimate", "Std. Error", "Beta", "Std. Err. Beta"))
	return (ret)
}
back to top