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

compute_forecast_performance(forecasts, measures = c("pls", "rmsfe", "mafe"))

Arguments

forecasts

an object 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.520697  1.5449833
#> UR     -1.450905 -1.9766725
#> EPR    -2.065292 -1.3587992
#> LFPR   -4.896042 -0.5775524
#> joint -17.086126 -2.0389549