forecast.rbfmvar: Out-of-Sample Forecasting for RBFM-VAR

View source: R/forecast.R

forecast.rbfmvarR Documentation

Out-of-Sample Forecasting for RBFM-VAR

Description

Generates out-of-sample forecasts from an RBFM-VAR model.

Usage

## S3 method for class 'rbfmvar'
forecast(object, h = 10, level = 95, ...)

Arguments

object

An rbfmvar object from rbfmvar.

h

Integer. Forecast horizon (number of periods ahead). Default is 10.

level

Numeric. Confidence level for prediction intervals (0-100). Default is 95.

...

Additional arguments (currently ignored).

Details

Forecasts are generated iteratively using the estimated VAR coefficients. Standard errors are computed assuming normally distributed innovations.

Note that since the RBFM-VAR is estimated on second differences, forecasts are for \Delta^2 y_{t+h}, which need to be accumulated to obtain level forecasts.

Value

An object of class "rbfmvar_forecast" containing:

mean

Matrix of point forecasts (n x h).

se

Matrix of forecast standard errors (n x h).

lower

Matrix of lower prediction bounds (n x h).

upper

Matrix of upper prediction bounds (n x h).

horizon

Forecast horizon.

level

Confidence level.

varnames

Variable names.

Examples

# Simulate VAR data
set.seed(123)
n <- 200
e <- matrix(rnorm(n * 3), n, 3)
y <- matrix(0, n, 3)
colnames(y) <- c("y1", "y2", "y3")
for (t in 3:n) {
  y[t, ] <- 0.3 * y[t-1, ] + 0.2 * y[t-2, ] + e[t, ]
}

fit <- rbfmvar(y, lags = 2)
fc <- forecast(fit, h = 10)
print(fc)
plot(fc)


rbfmvar documentation built on April 9, 2026, 9:08 a.m.