MDM.selection  R Documentation 
Selects Models with Outstanding Predictive Ability basing on Multivariate DieboldMariano Test.
Description
This function selects models with outstanding predictive ability basing on multivariate DieboldMariano test MDM.test
.
Usage
MDM.selection(realized,evaluated,q,alpha,statistic="Sc",loss.type="SE")
Arguments
realized 
vector of the real values of the modelled timeseries

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

alpha 
numeric indicating a significance level for multivariate DieboldMariano tests

statistic 
statistic="S" for the basic version of the test, and statistic="Sc" for the finitesample 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)1loss.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 MDM
object, list
of
outcomes 
matrix with mean losses for the selected models, statistics corresponding to losses differentials and ranking of these statistics

p.value 
numeric of pvalue from the procedure, i.e., pvalue of multivariate DieboldMariano test from the last step

alpha 
alpha , i.e., the chosen significance level

eliminated 
numeric indicating the number of eliminated models

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.selection(realized=ts,evaluated=forecasts,q=10,alpha=0.1,statistic="S",loss.type="AE")