R/mice_ml_lmer_extend_imputed_values_lower_level.R

Defines functions mice_ml_lmer_extend_imputed_values_lower_level

## File Name: mice_ml_lmer_extend_imputed_values_lower_level.R
## File Version: 0.05

mice_ml_lmer_extend_imputed_values_lower_level <- function( imp_upper,
    ry_lower, ry_upper, level_ids_lower, level_ids_upper, extend=TRUE)
{
    if (extend){
        cly2 <- level_ids_upper[ ! ry_upper ]
        i1 <- match( level_ids_lower[ ! ry_lower ], cly2 )
        imp <- imp_upper[ i1 ]
    } else {
        imp <- imp_upper
    }
    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.