R/mice_imputation_bygroup_modify_arguments.R

Defines functions mice_imputation_bygroup_modify_arguments

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


mice_imputation_bygroup_modify_arguments <- function(args, ind_gg,
    imputation_function, wy)
{
    Nmis <- sum(!args$ry)
    args_imputation_function <- methods::formalArgs(def=imputation_function)
    if ( "wy" %in% args_imputation_function ){
        args$wy <- wy[ind_gg]
        Nmis <- sum(args$wy)
    }
    #--- output
    res <- list( args=args, Nmis=Nmis)
    return(res)
}

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.