------------------------------------------------------------------------------- help fordmariano(StataList distribution 27jun2006) -------------------------------------------------------------------------------

Diebold-Mariano comparison of predictive accuracy

dmarianoactual pred1 pred2[ifexp] [inrange] [,maxlag(lags)crit(criterion)kernel(kernel) ]

dmarianois for use with time-series data. You musttssetyour data before usingdmariano; see help tsset.

actual, pred1, pred2may contain time-series operators; see help varlist.

Description

dmarianocalculates a measure of predictive accuracy proposed by Diebold and Mariano (DM, 1995). Given an actual series and two competing predictions, one may apply a loss criterion (such as squared error or absolute error) and then calculate a number of measures of predictive accuracy that allow the null hypothesis of equal accuracy to be tested. The S(1) measure, calculated in this routine, tests that the mean difference between the loss criteria for the two predictions is zero, using a long-run estimate of the variance of the difference series.

Options

maxlagspecifies the maximum order of the lag to be used in calculating the long-run variance of the difference series from its autocovariance function. If it is not provided, the maximum lag order will be calculated from the Schwert criterion as a function of the sample size.

critspecifies the loss criterion to be used. It currently may take on values MSE, MAE and MAPE. If not specified, MSE is assumed.

kernelspecifies the kernel to be used in calculating the long-run variance. It currently may take on values uniform and bartlett. As in the case of Newey-West standard errors, the weights of the Bartlett kernel guarantee that variance estimates will be positive definite. If not specified, the uniform kernel is employed.

Examples. use http://fmwww.bc.edu/ec-p/data/macro/barclaymonthly.dta,clear

. dmariano bbjpysp bbjpy1f bbjpy2f, max(6)

. dmariano bbjpysp bbjpy1f bbjpy2f, crit(MAE) kernel(bartlett)

. dmariano D.bbjpysp D.bbjpy1f D.bbjpy2f if tin(1987m12,1996m12), max(2) crit(MAPE)

ReferencesDiebold, Francis and Roberto Mariano, "Comparing Predictive Accuracy," Journal of Business and Economic Statistics, 13:3, 253-263, 1995.

AuthorChristopher F Baum, Boston College, USA, baum@bc.edu

Thanks to Oliver Jones for suggesting the addition of the MAPE loss criterion. Thanks to Somchai Amornthum for pointing out a flaw in the calculation of the long-run variance component of the test statistic.Acknowledgements

Also seeOn-line: help for predict