R/mice_imputation_extract_parameters_lm.R

Defines functions mice_imputation_extract_parameters_lm

## File Name: mice_imputation_extract_parameters_lm.R
## File Version: 0.03

mice_imputation_extract_parameters_lm <- function(mod)
{
    parms <- list(beta=mod$coef)
    rmod <- residuals(mod)^2
    parms$sigma <- sqrt( sum(rmod) / ( length(rmod) - length(mod$coef) ) )
    return(parms)
}

Try the miceadds package in your browser

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

miceadds documentation built on May 29, 2024, 11:05 a.m.