
Computes forecasting performance measures for recursive pseudo-out-of-sample forecasts
Source:R/compute_forecast_performance.R
compute_forecast_performance.ForecastsPANELpoos.Rd
Computes forecasting performance measures selected from:
log-predictive score "lps"
, root-mean-squared-forecast error "rmsfe"
,
mean-absolute-forecast error "mafe"
from the output of the recursive
pseudo-out-of-sample forecastinge exercise performed using function
forecast_poos_recursively
.
Usage
# S3 method for class 'ForecastsPANELpoos'
compute_forecast_performance(forecasts, measures = c("pls", "rmsfe", "mafe"))
Arguments
- forecasts
an object of class
ForecastsPANELpoos
containing the outcome of Bayesian recursive pseudo-out-of-sample forecasting exercise using expanding window samples generated using functionforecast_poos_recursively
.- measures
a character vector with any of the values
"lps"
,"rmsfe"
,"mafe"
indicating the forecasting performance measures to be computed.
Author
Tomasz Woźniak wozniak.tom@pm.me
Examples
spec = specify_bvarPANEL$new(ilo_dynamic_panel) # specify the model
poos = specify_poosf_exercise$new(spec, 10, 5, c(1,2), 30) # specify the forecasting exercise
fore = forecast_poos_recursively(spec, poos) # perform the forecasting exercise
#> **************************************************|
#> bpvars: Forecasting with Bayesian Panel VARs |
#> **************************************************|
#> Recursive pseudo-out-of-sample forecasting using
#> expanding window samples.
#> Press Esc to interrupt the computations
#> **************************************************|
#> Step 1: Estimate a model for a full sample to get
#> starting values for subsequent steps.
#> Step 2: Recursive pseudo out-of-sample
#> forecasting performed for 3 samples.
#> **************************************************|
fp = compute_forecast_performance(fore, "pls") # compute forecasting performance measures
fp$PLS$POL # print the forecasting performance measures
#> 1 2
#> gdp 1.8363870 1.89474279
#> UR -1.5461825 -1.85702063
#> EPR -0.9666967 -1.30363116
#> LFPR -0.1799819 -0.87529874
#> joint 2.2248881 -0.03802016