R/mice_imputation_factor_pmm_convert_factor.R

Defines functions mice_imputation_factor_pmm_convert_factor

## File Name: mice_imputation_factor_pmm_convert_factor.R
## File Version: 0.11

mice_imputation_factor_pmm_convert_factor <- function(imp, is_factor, y_aggr)
{
    if (is_factor){
        y_factor <- y_aggr[,1]
        imp <- y_factor[ match(imp, y_aggr[,2]) ]
    }
    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.