Skip to content

ENH: out-of-sample prediction, forecast comparison, multiplicity correction (paired t-test) #8784

Open

Description

@josef-pkt

edit I found an earlier issue #2291 closing that as duplicate with less information)

In a twitter message, a user of statsmodels mentioned using tukey-hsd to compare models on test data (out-of-sample)

tukey-hsd is inappropriate for this because it assumes samples are independent.

related #8216 suest, when we take into account that models are estimated on the same data, and compare in-sample statistics.

AFAICS
The Diebold-Mariano forecast comparison test, tests the difference of prediction errors. This would be similar to a "paired" t-test (for two correlated samples), while tukey-hsd is based on standard independent sample t-test.

So one possibilty might be to use a paired t-test and correct for multiple testing using one of the p-value correction methods.

I never looked closely at Diebold-Mariano or similar forecast comparison tests.

An updated perspective on the DM test:

Diebold, Francis X. “Comparing Predictive Accuracy, Twenty Years Later: A Personal Perspective on the Use and Abuse of Diebold–Mariano Tests.” Journal of Business & Economic Statistics 33, no. 1 (January 2, 2015): 1–1. https://doi.org/10.1080/07350015.2014.983236.

pairwise paired t-test sound like a useful function for statsmodels.
It does not specify and estimate the correlation, so parametric p-value correction as in tukey-hsd will not be available. The p-value correction (for I guess positive correlated samples) should still be valid.

One difference between time series and cross-section data should be that in the latter case we do not have to worry about serial correlation, it's assumed away. We don't need HAC or similar robust standard errors for serially correlated predictions or prediction errors.

aside: quick look at articles citing Diebold 2015
intersection-union test for multiple forecast comparisons
Spreng, Lars, and Giovanni Urga. “Combining P-Values for Multivariate Predictive Ability Testing.” Journal of Business & Economic Statistics 0, no. 0 (April 19, 2022): 1–13. https://doi.org/10.1080/07350015.2022.2067545.

Activity

  1. josef-pkt commented on May 5, 2023

    @josef-pkt
    MemberAuthor

    brief look at

    Clark, Todd E., and Kenneth D. West. “Approximately Normal Tests for Equal Predictive Accuracy in Nested Models.” Journal of Econometrics, 50th Anniversary Econometric Institute, 138, no. 1 (May 1, 2007): 291–311. https://doi.org/10.1016/j.jeconom.2006.05.023.

    they use an adjustment to forecast MSE to account for noise added by redundant covariates.
    non-standard distribution with recommended thresholds

    a related idea:
    use SUEST for combined cov_params to directly test out-of-sample forecast/prediction eval_measure taking parameter uncertainty into account. #8216
    Then, forecast comparison would be just a get_prediction case for a prediction function (which) that is nonlinear in parameters. However, eval_measures also need the out-of-sample endog. #7971
    We need eval_measures as a function of params, so we can use NonlinearDeltaCov _wald_test_nonlinear.

    (Also still missing: predict for two or more statistics with joint cov #3721)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions