propTestTargetE function

Proportion test to compare two misclassification rates.

Proportion test to compare two misclassification rates.

Used as a subroutine in InvariantEnvironmentPrediction to test whether out-of-sample performance is better when using X and Y as predictors for E, compared to using X only.

propTestTargetE(E, predictedOnlyX, predictedXY, verbose)

Arguments

  • E: An n-dimensional vector.
  • predictedOnlyX: Predictions for E based on predictors in X only.
  • predictedXY: Predictions for E based on predictors in X and Y.
  • verbose: Set to TRUE if output should be printed.

Returns

A list with the p-value for the test.