dse (version R2000.6-1)

forecast: Forecast Multiple Steps Ahead

Description

Calculate forecasts multiple steps ahead.

Usage

forecast(model, data,  horizon=36, percent=100, 
		conditioning.inputs=NULL, conditioning.inputs.forecasts=NULL)
	is.forecast.cov(x)

Arguments

model
An object of class TSmodel.
data
An object of class TSdata.
conditioning.inputs
conditioning.inputs.forecasts
horizon
percent

Value

  • The result is an object of class forecast which is a list with elements $model, $horizon, $conditioning.inputs, $percent, $pred and $forecast. $forecast is a list with TSdata objects as elements, one for each element in the list conditioning.inputs. $pred contains the one-step ahead forecasts for the preiods when output data is available. There is a plot method for this class.

Details

Calculate (multiple) forecasts from the end of data to a horizon determined either from supplied input data or the argument horizon (more details below). In the case of a model with no inputs the horizon is determined by the argument horizon. In the case of models with inputs, on which the forecasts are conditioned, the argument horizon is ignored (except when percent is specified) and the actual horizon is determined by the inputs in the following way: If inputs are not specified by optional arguments (as below) then the default will be to use input.data(data). This will be the same as the function l() unless input.data(data) is longer than output.data(data) (after NAs are trimmed from each separately). Otherwise, if conditioning.inputs is specified it is used for input.data(data). It must be a time series matrix or a list of time series matrices each of which is used in turn as input.data(data). The default above is the same as forecast(model, trim.na(data), conditioning.inputs=trim.na(input.data(data)) ) Otherwise, if conditioning.inputs.forecasts is specified it is appended to input.data(data). It must be a time series matrix or a list of time series matrices each of which is appended to input.data(data) and the concatenation used as conditioning.inputs. Both conditioning.inputs and conditioning.inputs.forecasts should not be specified. Otherwise, if percent is specified then conditioning.inputs.forecasts are set to percent/100 times the value of input corresponding to the last period of output.data(data) and used for horizon periods. percent can be a vector, in which case each value is applied in turn. ie c(90,100,110) would would give results for conditioning.input.forecasts 10 percent above and below the last value of input.

See Also

feather.forecasts, horizon.forecasts

Examples

Run this code
if(is.R()) data("egJofF.1dec93.data", package="dse1")
	model <- est.VARX.ls(window(egJofF.1dec93.data, end=c(1985,12)))
	pr <- forecast(model, conditioning.inputs=input.data(egJofF.1dec93.data))
	#tfplot(pr) Rbug 0.90.1
	is.forecast(pr)

Run the code above in your browser using DataLab