Skip to contents

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 function forecast_poos_recursively.

measures

a character vector with any of the values "lps", "rmsfe", "mafe" indicating the forecasting performance measures to be computed.

Value

An object of class ForecastingPerformance

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 1 sample.
#> **************************************************|
fp   = compute_forecast_performance(fore, "pls")   # compute forecasting performance measures
fp$PLS$POL                                         # print the forecasting performance measures
#>                1          2
#> gdp    -3.538821  1.4818433
#> UR     -1.555460 -2.0497031
#> EPR    -1.570553 -1.5299541
#> LFPR   -4.725469 -0.9161777
#> joint -14.442866  0.4728175