Class PooledRankTest
- All Implemented Interfaces:
RankTester
The statistic of Chi2RankTest is computed on each of the M imputed data sets, giving d_1, ..., d_M, each
referred by that test to a chi-square distribution with k degrees of freedom. These are combined by the rule of
Li, Meng, Raghunathan, and Rubin (1991, Statistica Sinica 1, 65-92) for chi-square statistics from multiply
imputed data, often called D2:
r = (1 + 1/M) · Var(√d_1, ..., √d_M) (sample variance, divisor M − 1)
D2 = ( mean(d)/k − ((M + 1)/(M − 1)) · r ) / (1 + r)
ν = k^(−3/M) · (M − 1) · (1 + 1/r)²
with D2 referred to an F distribution with k and ν degrees of freedom. Here r estimates the relative increase in
variance due to the missing values: where the imputations agree, r is near zero and the rule reduces to the
ordinary chi-square test on the mean statistic; where they disagree, the statistic is shrunk and the reference
distribution widened, so the disagreement counts against rejecting.
This is not the same as pooling independent data sets. The imputations share their observed values, so combining their p-values as if they were independent (Fisher's method), or adding their scores, would count the same rows M times.
What is and is not established: the rule is a standard approximation, derived assuming proper imputations under data missing at random and a common fraction of missing information across the parameters tested. It is known to be rough, with few imputations especially, and no calibration result is claimed for its use with the Lawley corrected rank statistic. Tetrad's imputers draw from a fitted model without redrawing the model's parameters (improper imputation), which understates r somewhat.
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionPooledRankTest(List<DataSet> imputations) Constructs the test from the imputed data sets. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfailToReject(int[] pcols, int[] qcols, int r, double alpha) Tests the null hypothesis that the cross-covariance of columnspcolsandqcolshas rank at mostr.intReturns the number of imputed data sets being pooled.static doublepooledPValue(double[] d, int df) Combines chi-square statistics from M imputations by the D2 rule; see the class comment.doublepValue(int[] pcols, int[] qcols, int r) The pooled p-value of the rank ≤ r test.doublerelativeIncreaseInVariance(int[] pcols, int[] qcols, int r) The relative increase in variance due to the missing values, as estimated for one test: the r of the class comment.
-
Constructor Details
-
PooledRankTest
-
-
Method Details
-
getNumImputations
public int getNumImputations()Returns the number of imputed data sets being pooled.- Returns:
- the number of imputations pooled.
-
failToReject
public boolean failToReject(int[] pcols, int[] qcols, int r, double alpha) Description copied from interface:RankTesterTests the null hypothesis that the cross-covariance of columnspcolsandqcolshas rank at mostr.- Specified by:
failToRejectin interfaceRankTester- Parameters:
pcols- column indices of the first set.qcols- column indices of the second set.r- the hypothesized maximum rank.alpha- the significance level.- Returns:
- true if the null is NOT rejected (rank deficiency is consistent with the data), false if rejected.
-
pValue
public double pValue(int[] pcols, int[] qcols, int r) The pooled p-value of the rank ≤ r test.- Specified by:
pValuein interfaceRankTester- Parameters:
pcols- column indices of the first set.qcols- column indices of the second set.r- the hypothesized maximum rank.- Returns:
- the p-value, or 0 when the degrees of freedom are not positive.
-
relativeIncreaseInVariance
public double relativeIncreaseInVariance(int[] pcols, int[] qcols, int r) The relative increase in variance due to the missing values, as estimated for one test: the r of the class comment. Zero with a single imputation.- Parameters:
pcols- column indices of the first set.qcols- column indices of the second set.r- the hypothesized maximum rank.- Returns:
- the estimate.
-
pooledPValue
public static double pooledPValue(double[] d, int df) Combines chi-square statistics from M imputations by the D2 rule; see the class comment.- Parameters:
d- the statistics, one per imputation.df- their common degrees of freedom; positive.- Returns:
- the pooled p-value.
-