| mi.preprocess {mi} | R Documentation |
Function for propressing and postprocessing mixed,
and positive-continuous variable types in mi data object
mi.preprocess(data, type=NULL, varnames=NULL) mi.postprocess(mi.data)
data |
the data.frame to be imputed. |
type |
the type of the variable, see typecast, default=NULL |
varnames |
the name of the variable to be transpformed,
default=NULL. |
mi.data |
the imputed data list, obtained from mi.completed |
mi.proprocess will transform the mixed and positive-continuous
variable types. If the variable is of mixed type, the function transforms the variable
into two variables: an indicator indicates whether the value is postive or not and
a transformed variable that takes on all positive value and is transformed either by taking
a log; 0 and NA will be treated as missing for such a variable. If the variable
is of positive-continuous type, it will be transformed by taking a log.
mi.postprocess will transform the imputed dataset back to its original form.
The imputed dataset is obtained from mi.completed function.
a data.frame or a list of dataframe.
Yu-Sung Su ys463@columbia.edu, Andrew Gelman gelman@stat.columbia.edu