TrainFastImputation {FastImputation} | R Documentation |
Learn from the training data so that later you can fill in missing data
Description
Like Amelia, FastImputation assumes that the columns of the data are multivariate normal or can be transformed into approximately multivariate normal.
Usage
TrainFastImputation(x, constraints = list(), idvars, categorical)
Arguments
x |
Dataframe containing training data. Can have incomplete rows. |
constraints |
A list of constraints. See the examples below for formatting details. |
idvars |
A vector of column numbers or column names to be ignored in the imputation process. |
categorical |
A vector of column numbers or column names of varaibles with a (small) set of possible values. |
Value
An object of class 'FastImputationPatterns' that contains information needed later to impute on a single row.
Author(s)
Stephen R. Haptonstahl srh@haptonstahl.org
References
https://gking.harvard.edu/amelia
See Also
Examples
data(FI_train) # provides FI_train dataset
patterns_with_constraints <- TrainFastImputation(
FI_train,
constraints=list(list("bounded_below_2", list(lower=0)),
list("bounded_above_5", list(upper=0)),
list("bounded_above_and_below_6", list(lower=0, upper=1))
),
idvars="user_id_1",
categorical="categorical_9")
[Package FastImputation version 2.2.1 Index]