Learn R Programming

JointAI (version 0.1.0)

get_imp_meth: Find default imputation methods and order

Description

Find default imputation methods and order

Usage

get_imp_meth(fixed, random = NULL, data, auxvars = NULL)

Arguments

fixed

a two sided (fixed effects) model formula (see formula).

random

only for lme_imp: a one-sided formula of the form ~x1 + ... + xn | g, where x1 + ... + xn specifies the model for the random effects and g the grouping variable

data

a data frame

auxvars

optional vector of variable names that should be used as predictors in the imputation procedure (and will be imputed if necessary) but are not part of the analysis model

Value

a named vector containing those variables in data that have missing values and their assigned default imputation methods, sorted by proportion of missing values

Examples

Run this code
# NOT RUN {
get_imp_meth(y ~ C1 + C2 + B2 + O2 + M2, data = wideDF)
# }

Run the code above in your browser using DataLab