forecast.cov
Forecast covariance for different models
Description
Calculate the forecast covariance for different models.
Usage
forecast.cov(obj, data=NULL, discard.before=NULL,
horizons=1:12, zero=F, trend=F, estimation.sample= periods(data))
Required Arguments
- obj
-
A TSmodel, TSestModel or a list of TSmodels or TSestModels
- data
-
An object of class TSdata.
Optional Arguments
- discard.before
-
Period before which forecasts should be discarded when calculating covariance.
- horizons
-
Horizons for which forecast covariance should be calculated.
- zero
-
If T the covariance is calculated for a forecast of zero.
- trend
-
If T the covariance is calculated for a forecast of trend.
- estimation.sample
-
Portion of the sample to use for calculating the trend.
Value
A list with the forecast covariance for supplied models on the given
sample. This is in the element $forecast.cov of the result. Other
elements contain information in the arguments.
Details
Calculate the forecast cov of ... models with data.
This is just multiple applications of forecast.cov.single.TSmodel
discard.before is an integer indicating the number of points in the
beginning of forecasts to discard before calculating covariances.
If it is the default, NULL, then the default (minimum.startup.lag) will
be used for each model and the default (1) will be used for trend and zero.
If zero is T then forecast.cov is also calculated for a forecast of zero.
If trend is T then forecast.cov is also calculated for a forecast of a linear
trend using data to estimation.sample.
Examples
z <- forecast.cov(model1, model2, data=trim.na(example.BOC.93.4.data.all.raw))
return to Table of Contents