Class MvnImputer
java.lang.Object
edu.cmu.tetrad.data.missing.MvnImputer
- All Implemented Interfaces:
MultipleImputer
A multiple imputer for continuous data under a saturated multivariate normal model. The mean and covariance are
estimated once by EM (see
EmCovarianceEstimator); each missing block is then drawn from its conditional
normal distribution given the observed entries of its row: N(mu_M + S_MO S_OO^{-1} (x_O - mu_O),
S_MM - S_MO S_OO^{-1} S_OM). Valid under MAR for approximately multivariate normal data.
Note: this is "improper" multiple imputation in Rubin's sense--the model parameters are fixed at their EM estimates rather than drawn from a posterior--so between-imputation variability is somewhat understated. For pooling graphs by edge frequency this is a reasonable first implementation; a proper (posterior-draw) variant is a flagged follow-up.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an imputer with default EM settings.MvnImputer(MissingDataSpec spec) Constructs an imputer whose EM settings (ridge, tolerance, max iterations) are taken from the given spec. -
Method Summary
-
Constructor Details
-
MvnImputer
public MvnImputer()Constructs an imputer with default EM settings. -
MvnImputer
Constructs an imputer whose EM settings (ridge, tolerance, max iterations) are taken from the given spec.- Parameters:
spec- The spec.
-
-
Method Details
-
impute
Produces m completed copies of the given dataset.- Specified by:
imputein interfaceMultipleImputer- Parameters:
dataSet- The dataset; must contain at least one missing value.m- The number of imputations; at least 1. With 1, the single completed dataset shows nothing of the uncertainty due to the missing values, which is what the differences among several show.seed- A random seed for reproducibility, or -1 for a random seed.- Returns:
- The m completed datasets.
-