R/mice.impute.eap.R

## File Name: mice.impute.eap.R
## File Version: 2.07

mice.impute.eap <- function (y, ry, x, eap, ...)
{
    pos <- parent.frame(n=1)
    res <- mice_imputation_get_states(pos=pos)
    vname <- res$vname
    newstate <- res$newstate
    M.scale <- eap[[ vname ]][[ "M" ]]
    SE.scale <- eap[[ vname ]][[ "SE" ]]
    N <- length(M.scale)
    ximp <- stats::rnorm( N, mean=M.scale, sd=SE.scale )
    return(ximp)
}

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.