UniGASRoll: Rolling forecast with univariate GAS models

Description Usage Arguments Value Author(s) Examples

View source: R/Forecast.R

Description

One-step ahead rolling forecasts with model re-estimation. The function also reports several quantity for backtesting for point and density forecasts.

Usage

1
2
3
UniGASRoll(data, GASSpec, ForecastLength = 500, Nstart = NULL,
           RefitEvery = 23, RefitWindow = c("moving", "recursive"),
           cluster = NULL, Compute.SE = FALSE, ...)

Arguments

data

numeric vector containing the time series of observations.

GASSpec

An object of the class uGASSpec created using the function UniGASSpec.

ForecastLength

numeric Length of the out-of-sample.

Nstart

numeric Period when perform the first forecast. Ignored if ForecastLength is supplied.

RefitEvery

numeric Number of periods before model coefficients re-estimation.

RefitWindow

character Type of window. If RefitWindow = "recursive" all the observations are used when the model is re-estimated. If RefitWindow = "moving" old observations are eliminated.

cluster

A cluster object created calling using the paralell package. If supplied parallel processing is used to speed up the computations.

Compute.SE

logical. Should asymptotic Standard Errors be computed? By default Compute.SE = FALSE

...

Additional arguments for UniGASFit

Value

An object of the class uGASRoll.

Author(s)

Leopoldo Catania

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Specify an univariate GAS model with Student-t
# conditional distribution and time-varying location, scale and shape parameter

# Inflation Forecast

data("cpichg")
help(cpichg)

GASSpec = UniGASSpec(Dist = "std", ScalingType = "Identity",
                     GASPar = list(location = TRUE, scale = TRUE, shape = FALSE))

# Perform 1-step ahead rolling forecast with refit
library("parallel")

Roll = UniGASRoll(cpichg, GASSpec, ForecastLength = 50,
                  RefitEvery = 12, RefitWindow = c("moving"))


Roll

LeopoldoCatania/GAS documentation built on April 27, 2020, 1:43 a.m.