TrainFastImputation: Learn from the training data so that later you can fill in...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/TrainFastImputation.R

Description

Like Amelia, FastImputation assumes that the columns of the data are multivariate normal or can be transformed into approximately multivariate normal.

Usage

1
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

http://gking.harvard.edu/amelia/

See Also

FastImputation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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")
  

FastImputation documentation built on May 1, 2019, 10:53 p.m.