horizonForecasts {dse2}R Documentation

Calculate forecasts at specified horizons

Description

Calculate forecasts at specified horizons.

Usage

    is.horizonForecasts(obj)
    horizonForecasts(obj, ...)
    horizonForecasts(obj, data, horizons=1:4,
         discard.before=minimum.startup.lag(obj), compiled=.DSECOMPILED)
    horizonForecasts(obj, data=NULL, ...)
    horizonForecasts(obj, model, ...)

Arguments

obj an object of class TSmodel, TSdata, or TSestModel.
model an object of class TSmodel.
data an object of class TSdata
horizons a vector of integers indicating the horizon at which forecasts should be produced.
discard.before period before which forecasts are not calculated.
compiled if T compiled code is called.
... arguments to be passed to other methods.

Details

Calculate multiple 'horizon'-step ahead forecasts ie. calculate forecasts but return only those indicated by horizons. Thus, for example, the result of horizonForecasts(model, data horizons=c(1,5)) would be the one-step ahead and five step ahead forecasts.

Value

The result is a list of class horizonForecasts with elements model (a TSmodel), data, horizons, discard.before, and horizonForecasts. horizonForecasts is an array with three dimension: c(length(horizons), dim(model$data)). Projections are not calculated before discard.before or after the end of output.data(data). Each horizon is aligned so that horizonForecasts[h,t,] contains the forecast for the data point output.data(data)[t,] (from horizon[h] periods prior).

See Also

featherForecasts

Examples

if(is.R()) data("eg1.DSE.data.diff", package="dse1")
model <- est.VARX.ls(eg1.DSE.data.diff)
z <-  horizonForecasts(model, eg1.DSE.data.diff)

[Package Contents]