cwTest#

Purpose#

Clark-West test for comparing nested forecast models.

Format#

t = cwTest(e_r, e_u, fc_r, fc_u)#
Parameters:
  • e_r (Nx1 vector) – forecast errors from the restricted (simpler) model.

  • e_u (Nx1 vector) – forecast errors from the unrestricted (larger) model.

  • fc_r (Nx1 vector) – point forecasts from the restricted model.

  • fc_u (Nx1 vector) – point forecasts from the unrestricted model.

Returns:

t (struct) – An instance of a testResult structure.

Examples#

new;
library timeseries;

// Restricted: AR(1), Unrestricted: VAR(4)
t = cwTest(e_ar1, e_var4, fc_ar1, fc_var4);
print "CW statistic:" t.statistic;
print "p-value:" t.p_value;

Remarks#

The standard Diebold-Mariano test is biased in favor of the restricted model when models are nested (Clark & West 2007). This test adjusts for the noise in the unrestricted model’s parameter estimates.

Model#

The Clark-West adjusted statistic adds a correction term for the noise in the unrestricted model’s forecasts:

\[\tilde{d}_t = (e_{R,t})^2 - \left[(e_{U,t})^2 - (\hat{y}_{R,t} - \hat{y}_{U,t})^2\right]\]

where \(e_R\) and \(e_U\) are forecast errors from the restricted and unrestricted models, and the squared difference in forecasts corrects for the bias. The test statistic is the t-statistic of \(\bar{\tilde{d}}\) with HAC standard errors.

References#

  • Clark, T.E. and K.D. West (2007). “Approximately normal tests for equal predictive accuracy in nested models.” Journal of Econometrics, 138(1), 291-311.

Library#

timeseries

Source#

scoring.src

See also

Functions dmTest(), mcsTest()