fvar: Fixed-Scheme Forecast based on VAR

Description Usage Arguments Author(s) Examples

Description

This function makes one-step-ahead forecasts for a VAR model with a fixed scheme. The forecasts will be returned alongside root mean squared errors (rmse). Only VAR models with two time series are supported. Future updates might support more general models with multiple time series.

Usage

1
fvar(model=NULL, test=NULL, y=NULL)

Arguments

model

the VAR model based on which forecasts should be made. The model should be built with a subset of the time series only (training set).

test

the testing data based on which information is updated.

y

the variable to make forecasts for. This should be the index indicating the column where the variable is positioned in the data frame.

Author(s)

Zehua Wu

Examples

1
2
3
4
5
6
7
8
##Example using data from vars package

library(vars)
data(Canada)
train.data<-Canada[1:40, 1:2]
test.data<-Canada[41:84, 1:2]
model<-VAR(train.data, p=2)
fvar(model=model, test=test.data, y=2)

ZehuaWu/farima documentation built on May 29, 2019, 12:01 a.m.