fit.piar: Fit a Periodically Integrated Autoregressive Model.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/partsm.R

Description

Fit a periodically integrated periodic autoregressive model.

Usage

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

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.

Details

The following equation is estimated by non-linear least squares

y_t = α_s y_{t-1} + β_s (y_{t-1} - α_{s-1} y_{t-2}) + ε_t,

under the restriction Π_{i=1}^{S} α_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 β parameters are equal to zero.

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.

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

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

Examples

1
2
3
4
5
6
    ## 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)
  

partsm documentation built on Nov. 25, 2020, 5:07 p.m.