View source: R/TrainFastImputation.R
TrainFastImputation | R Documentation |
Like Amelia, FastImputation assumes that the columns of the data are multivariate normal or can be transformed into approximately multivariate normal.
TrainFastImputation(x, constraints = list(), idvars, categorical)
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. |
An object of class 'FastImputationPatterns' that contains information needed later to impute on a single row.
Stephen R. Haptonstahl srh@haptonstahl.org
https://gking.harvard.edu/amelia
FastImputation
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.