# MDM.test: Computes Multivariate Diebold-Mariano Test for the Equal... In multDM: Multivariate Version of the Diebold-Mariano Test

 MDM.test R Documentation

## Computes Multivariate Diebold-Mariano Test for the Equal Predictive Accuracy of Two or More Non-nested Forecasting Models.

### Description

This function computes multivariate Diebold-Mariano test for the equal predictive accuracy of two or more non-nested forecasting models. The null hypothesis of this test is that the evaluated forecasts have the same accuracy. The alternative hypothesis is that Equal predictive accuracy (EPA) does not hold.

### Usage

```MDM.test(realized,evaluated,q,statistic="Sc",loss.type="SE")
```

### Arguments

 `realized` `vector` of the real values of the modelled time-series `evaluated` `matrix` of the forecasts, columns correspond to time index, rows correspond to different models `q` `numeric` indicating a lag length beyond which we are willing to assume that the autocorrelation of loss differentials is essentially zero `statistic` `statistic="S"` for the basic version of the test, and `statistic="Sc"` for the finite-sample correction, if not specified `statistic="Sc"` is used `loss.type` method to compute the loss function, `loss.type="SE"` will use squared errors, `loss.type="AE"` will use absolute errors, `loss.type="SPE"` will use squred proportional error (useful if errors are heteroskedastic), `loss.type="ASE"` will use absolute scaled error, if `loss.type` will be specified as some `numeric`, then the function of type `exp(loss.type*errors)-1-loss.type*errors` will be used (useful when it is more costly to underpredict `realized` than to overpredict), if not specified `loss.type="SE"` is used

### Value

class `htest` object, `list` of

 `statistic` test statistic `parameter` `q`, a lag length `alternative` alternative hypothesis of the test `p.value` p-value `method` name of the test `data.name` names of the tested objects

### References

Mariano R.S., Preve, D., 2012. Statistical tests for multiple forecast comparison. Journal of Econometrics 169, 123–130.

### Examples

```data(MDMforecasts)
ts <- MDMforecasts\$ts
forecasts <- MDMforecasts\$forecasts
MDM.test(realized=ts,evaluated=forecasts,q=10,statistic="S",loss.type="AE")
```

multDM documentation built on June 9, 2022, 5:06 p.m.