fit.piar {partsm} | R Documentation |
Fit a periodically integrated periodic autoregressive model.
fit.piar (wts, detcomp, p, initvalues=NULL)
wts |
a univariate time series object. |
detcomp |
a vector indicating the deterministic components included in the auxiliar regression. See
the corresponding item in fit.ar.par . |
p |
the order of the PAR model. In this version first and second order are considered. |
initvalues |
by default, initial values are computed for the non-linear modeal. However, in this version there may be cases in which the estimates do not converge, giving an error message. In this case, a numeric vector with initial values guessed by the user can be included. |
The following equation is estimated by non-linear least squares
y_t = \alpha_s y_{t-1} + \beta_s (y_{t-1} - \alpha_{s-1} y_{t-2}) + \epsilon_t,
under the restriction \Pi_{i=1}^{S} \alpha_i = 1 for s=1,...,S, where S denotes
the number of seasons. Regressors defined in detcomp
can also be included. Obviously, for a first
order PIAR process \beta parameters are equal to zero.
An object of class fit.piartsm-class
containing the estimated coefficients in the restricted
non-linear model, the residuals, and the periodic autoregressive coefficients. On the basis of the
estimated alpha parameters, the periodically differenced data are also computed. See
fit.piartsm-class
for methods that display this information.
Javier Lopez-de-Lacalle javlacalle@yahoo.es.
P.H. Franses: Periodicity and Stochastic Trends in Economic Time Series (Oxford University Press, 1996).
nls
, fit.ar.par
, and fit.piartsm-class
.
## Fit a PIAR(2) model for the logarithms of the Real GNP in Germany. data("gergnp") lgergnp <- log(gergnp, base=exp(1)) detcomp <- list(regular=c(0,0,0), seasonal=c(1,0), regvar=0) out <- fit.piar(wts=lgergnp, detcomp=detcomp, p=2, initvalues=NULL)