R/mice_multilevel_imputation_draw_residuals.R

Defines functions mice_multilevel_imputation_draw_residuals

## File Name: mice_multilevel_imputation_draw_residuals.R
## File Version: 0.08


#*** draw residuals
mice_multilevel_imputation_draw_residuals <- function(predicted, sigma )
{
    N0 <- length(predicted)
    imp <- predicted + stats::rnorm(N0, mean=0, sd=sigma)
    return(imp)
}

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.