Learn R Programming

bpvars (version 1.0)

compute_forecast_performance: Computes forecasting performance measures for recursive pseudo-out-of-sample forecasts

Description

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"))

Value

An object of class ForecastingPerformance

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.

Author

Tomasz Woźniak wozniak.tom@pm.me

See Also

forecast_poos_recursively, forecast_poos_recursively.BVARPANEL, forecast_poos_recursively.BVARGROUPPANEL

Examples

Run this code
spec = specify_bvarPANEL$new(ilo_dynamic_panel[1:5])               # specify the model
poos = specify_poosf_exercise$new(spec, 2, 5, 1, 30)    # specify the forecasting  exercise
fore = forecast_poos_recursively(spec, poos)                  # perform the forecasting  exercise
fp   = compute_forecast_performance(fore, "pls")   # compute forecasting performance measures

Run the code above in your browser using DataLab