Learn R Programming

partsm (version 1.1-4)

fit.piar: Fit a Periodically Integrated Autoregressive Model.

Description

Fit a periodically integrated periodic autoregressive model.

Usage

fit.piar (wts, detcomp, p, initvalues=NULL)

Value

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.

Arguments

wts

a univariate time series object.

detcomp

a vector indicating the deterministic components included in the auxiliary 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 model. 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.

Author

Javier Lopez-de-Lacalle javlacalle@yahoo.es.

Details

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.

References

P.H. Franses: Periodicity and Stochastic Trends in Economic Time Series (Oxford University Press, 1996).

See Also

nls, fit.ar.par, and fit.piartsm-class.

Examples

Run this code
    ## 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)
  

Run the code above in your browser using DataLab