Enum Class MissingDataPolicy
- All Implemented Interfaces:
Serializable, Comparable<MissingDataPolicy>, Constable
An explicit statement of how missing values in a dataset are to be handled by a score, independence test, or search
wrapper. The intent is to replace the current implicit behavior--in which, e.g., some scores silently switch to
test-wise deletion when a dataset contains missing values--with a policy that the user chooses (or is at least
warned about), and that every component either honors or rejects loudly.
The statistical assumptions differ by policy and matter for real-data analysis. Listwise and test-wise deletion are unbiased in general only when data are missing completely at random (MCAR). EM-estimated covariance and multiple imputation are valid under the weaker missing-at-random (MAR) assumption, for approximately multivariate normal data in the EM case. None of these policies corrects for missing-not-at-random (MNAR) mechanisms.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEstimate the mean and covariance matrix once by expectation-maximization under a saturated Gaussian model (seeEmCovarianceEstimator) and run the analysis on the estimated covariance matrix as if it were complete data.Refuse to analyze data containing missing values; an exception should be thrown.Delete every row containing at least one missing value, once, up front, and analyze the remaining complete cases.Impute m completed datasets, run the analysis on each, and pool the results (for graph searches, by edge frequency across imputations).Estimate the covariance matrix once by pairwise deletion (seePairwiseCovarianceEstimator) and run the analysis on it as if it were complete data: each correlation from the rows complete on its pair, rescaled by each variable's standard deviation over all its observed rows, and shrunk toward the identity just enough to be positive definite.For each local score or independence test, use only the rows that are complete on the variables involved in that particular calculation. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the policy estimates one covariance matrix from the incomplete data and analyzes it as complete data: EM_COVARIANCE or PAIRWISE_COVARIANCE.static MissingDataPolicyReturns the enum constant of this class with the specified name.static MissingDataPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
FAIL
Refuse to analyze data containing missing values; an exception should be thrown. This is the safest default for components that have no principled way to handle missingness. -
LISTWISE
Delete every row containing at least one missing value, once, up front, and analyze the remaining complete cases. Unbiased only under MCAR; can discard a large fraction of the data when missingness is scattered. -
TESTWISE
For each local score or independence test, use only the rows that are complete on the variables involved in that particular calculation. This retains more data than listwise deletion but is still unbiased only under MCAR, and different local calculations are performed on different subsamples, which can produce inconsistencies (e.g., non-positive-definite implied covariances). This is the current implicit behavior of, e.g., SemBicScore when missing values are present. -
EM_COVARIANCE
Estimate the mean and covariance matrix once by expectation-maximization under a saturated Gaussian model (seeEmCovarianceEstimator) and run the analysis on the estimated covariance matrix as if it were complete data. Valid under MAR for approximately multivariate normal data. Applies to continuous datasets and covariance-consuming scores/tests. -
MULTIPLE_IMPUTATION
Impute m completed datasets, run the analysis on each, and pool the results (for graph searches, by edge frequency across imputations). Valid under MAR given a correctly specified imputation model; applicable to continuous, discrete, and mixed data. -
PAIRWISE_COVARIANCE
Estimate the covariance matrix once by pairwise deletion (seePairwiseCovarianceEstimator) and run the analysis on it as if it were complete data: each correlation from the rows complete on its pair, rescaled by each variable's standard deviation over all its observed rows, and shrunk toward the identity just enough to be positive definite. Needs no model of the data, unlike EM_COVARIANCE, but is unbiased only under MCAR. Accepted by every component that accepts EM_COVARIANCE. Added after the other values, so their ordinals are unchanged.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
estimatesCovariance
public boolean estimatesCovariance()Whether the policy estimates one covariance matrix from the incomplete data and analyzes it as complete data: EM_COVARIANCE or PAIRWISE_COVARIANCE. Components that consume a covariance matrix support both, getting the matrix fromMissingDataUtils.estimateCovariance(edu.cmu.tetrad.data.DataSet, MissingDataSpec).- Returns:
- True for EM_COVARIANCE and PAIRWISE_COVARIANCE.
-