BacktestDMA: Backtest measures for Dynamic Model Averaging and comparison...

Description Usage Arguments Details Value Author(s) Examples

View source: R/BackTest.R

Description

Backtest measures for Dynamic Model Averaging and comparison with Dynamic Model Selection. This function evaluates the out of sample performance of DMA and compare it with DMS.

Usage

1
    BacktestDMA(object, iBurnPeriod = NULL)

Arguments

object

an object of the class DMA-class, created using the function DMA.

iBurnPeriod

An integer indicating the length of the burn-in period. By default iBurnPeriod = NULL. If iBurnPeriod = NULL then one third of the total sample is used as the burn-in in period and a warning is printed.

Details

The function returns a matrix with Mean Squared Error (MSE), Mean Absolute Error (MAD) and Predictive Likelihood for DMA and DMS using the predictions during the out-of-sample period.

Value

An object of the class matrix.

Author(s)

Leopoldo Catania & Nima Nonejad

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(eDMA)

## load data
data("USData")

## do DMA, keep the first three predictors fixed and the intercept
Fit <- DMA(GDPDEF ~ Lag(GDPDEF, 1) + Lag(GDPDEF, 2) + Lag(GDPDEF, 3) +
            Lag(ROUTP, 1) + Lag(UNEMP, 1), data = USData, vDelta = c(0.9, 0.95, 0.99),
            vKeep = c(1, 2, 3))

BacktestDMA(Fit, iBurnPeriod = 32)

eDMA documentation built on May 2, 2019, 1:43 p.m.