directforecast: Function to obtain h-step ahead direct forecast based on...

View source: R/directforecast.R

directforecastR Documentation

Function to obtain h-step ahead direct forecast based on estimated VAR, VARX or VARMA model

Description

Function to obtain h-step ahead direct forecast based on estimated VAR, VARX or VARMA model

Usage

directforecast(fit, h = 1)

Arguments

fit

Fitted sparse VAR, VARX or VARMA model.

h

Desired forecast horizon. Default is h=1.

Value

Vector of length k containing the h-step ahead forecasts for the k time series.

Examples

data(var.example)
VARfit <- sparseVAR(Y=scale(Y.var), selection = "cv") # sparse VAR
VARforecast <- directforecast(fit=VARfit, h=1)

bigtime documentation built on Aug. 22, 2023, 1:08 a.m.