predictpiar {partsm} | R Documentation |
Predictions for a Restricted Periodic Autoregressive Model
Description
This function performs predictions for a restricted periodic autoregressive model. This version considers PIAR models up to order 2 with seasonal intercepts. It is implemented for quarterly observed data.
Usage
predictpiar (wts, p, hpred)
Arguments
wts |
a univariate time series object. |
p |
the order of the PAR model. At present first and second order are considered. |
hpred |
number of out-of-sample observations to forecast. It must be a multiple of 4. |
Details
Upon the multivariate representation,
where the are
matrices containing the
, the one-step-ahead forecasts for the year
is straightforward,
Multi-step-ahead forecasts are obtained recursively.
The prediction errors variances for the one-step-ahead forecast are the diagonal elements of
whereas for years ahead forecasts it becomes
where .
This version considers PIAR models up to order 2 for quarterly observed data. By default, seasonal intercepts are included in the model as deterministic components.
The number of observations to forecast, hpred
must be a multiple of 4.
Value
An object of class pred.piartsm-class
containing the forecasts and the corresponding
standard errors, as well as the 95 per cent confidence intervals.
Author(s)
Javier Lopez-de-Lacalle javlacalle@yahoo.es.
References
P.H. Franses: Periodicity and Stochastic Trends in Economic Time Series (Oxford University Press, 1996).
See Also
fit.piar
, PAR.MVrepr-methods
, and pred.piartsm-class
.
Examples
## 24 step-ahead forecasts in a PIAR(2) model for the
## logarithms of the Real GNP in Germany.
data("gergnp")
lgergnp <- log(gergnp, base=exp(1))
pred.out <- predictpiar(wts=lgergnp, p=2, hpred=24)