DMARIANO Procedure |
@DMARIANO does the Diebold-Mariano comparison of forecasts (which must already be computed) from Diebold and Mariano(1995), or (optionally) the Modified DM test from Harvey, Leybourne, Newbold(1997). @GNEWBOLD is a related procedure with does the Granger-Newbold test.
Note well that the Diebold-Mariano test does not apply when the forecasting procedures are "nested" (one is a special case of the other) because the asymptotics collapse if the more restricted model is correct.
@DMariano( options ) actual f1 f2 start end
Parameters
|
actual |
series of actual data |
|
f1 |
first set of forecasts |
|
f2 |
second set of forecasts |
|
start, end |
range to analyze (common range of f1, f2 and actual by default) |
Options
CRITERION=[MSE]/MAE
Chooses whether the error criterion will be squared or absolute errors
LWINDOW=NEWEYWEST/BARTLETT/[TRUNCATED]/PARZEN/QUADRATIC
Chooses the lag window form (NEWEYWEST and BARTLETT are synonyms).
LAGS=number of lags (for most windows) or bandwidth (for LWINDOW=QUADRATIC)
MODIFIED/[NOMODIFIED]
MODIFIED chooses the small sample correction from Harvey, Leybourne and Newbold.
TITLE=title for report ["Diebold-Mariano Forecast Comparison Test"]
[PRINT]/NOPRINT
Variables Defined
|
%CDSTAT |
Test statistic for f1=f2 vs f2 better than f1. Flipping the sign gives the test statistic for f2=f1 vs f1 better than f2. |
Sample Output
The P values will (by construction) always add up to one. A small P value indicates that the forecast on the line will be rejected in favor of the other.
Diebold-Mariano Forecast Comparison Test
Forecasts of SPREAD over 1995:04 to 2008:01
Forecast MAE Test Stat P(DM>x)
FORECAST_AR7 0.35514485 0.0241 0.49039
FORECAST_AR2MA17 0.35478985 -0.0241 0.50961
Copyright © 2025 Thomas A. Doan