Usage
imputation(origdata, method, vartype = NULL, missingpct = NULL, condition = NULL, knn = 5, mi.n = 3, mi.seed = 1234567, row_var = NULL)
Arguments
origdata
A data frame whose missing values need to be
imputed. This data frame should be selected from the missing
data GUI.
method
The imputation method selected from the missing
data GUI. Must be one of 'Below 10
'MI:areg','MI:norm','MI:mice','MI:mi'. If method='MI:mice',
then the methods of the variables containing NA's must be attached
with argument method. If not, then default methods are used.
vartype
A vector of the classes of origdata. The length is
the same as the number of columns of origdata. The value should be
from "integer", "numeric", "logical", "character", "factor", and "ordered".
missingpct
A vector of the percentage of missings of the
variables in origdata. The length is the same as the number of
columns of origdata. The values should be between 0 and 1.
condition
A vector of categorical variables. The dataset
will be partitioned based on those variables, and then the
imputation is implemented in each group. There are no missing
values in those variables. If it is null, then there is no
division. The imputation is based on the whole dataset.
knn
number of the neighbors.
mi.n
number of the imputation sets for multiple imputation
mi.seed
random number seed for multiple imputation
row_var
A column name (character) that defines the ID of rows.