R/beta.coef.R

beta.coef <-
function (md) 
    {
        coef <- summary(md)$coef[-1, 1]
        sd.x <- sapply(md$model[-1], sd)
        sd.y <- sapply(md$model[1], sd)
        beta <- coef*(sd.x/sd.y)
        return(beta)
    }

Try the SciencePo package in your browser

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

SciencePo documentation built on May 2, 2019, 5:53 p.m.