BacktestDMA | R Documentation |
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.
BacktestDMA(object, iBurnPeriod = NULL)
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 |
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.
An object of the class matrix
.
Leopoldo Catania & Nima Nonejad
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.