R/lm.beta.R

"lm.beta" <-
function (MOD) 
{
b <- summary(MOD)$coef[-1,1]
sx <- sapply(MOD$model[-1], sd)
sy <- sapply(MOD$model[1], sd)
beta <- b * sx /  sy
return(beta)
}

Try the QuantPsyc package in your browser

Any scripts or data that you put into this service are public.

QuantPsyc documentation built on June 4, 2022, 1:06 a.m.