Learn R Programming

timsac (version 1.3.0)

mlocar: Minimum AIC Method of Locally Stationary AR Model Fitting; Scalar Case

Description

Locally fit autoregressive models to non-stationary time series by minimum AIC procedure.

Usage

mlocar(y, max.order=NULL, span, const=0, plot=TRUE)

Arguments

y
a univariate time series.
max.order
upper limit of the order of AR model. Default is $2 \sqrt{n}$, where $n$ is the length of the time series y.
span
length of the basic local span.
const
integer. 0 denotes constant vector is not included as a regressor and 1 denotes constant vector is included as the first regressor.
plot
logical. If TRUE (default) spectrums pspec are plotted.

Value

  • meanmean.
  • varvariance.
  • nsthe number of local spans.
  • orderorder of the current model.
  • arcoefAR coefficients of current model.
  • vinnovation variance of the current model.
  • initinitial point of the data fitted to the current model.
  • endend point of the data fitted to the current model.
  • pspecpower spectrum.
  • npredata length of the preceding stationary block.
  • nnewdata length of the new block.
  • order.movorder of the moving model.
  • v.movinnovation variance of the moving model.
  • aic.movAIC of the moving model.
  • order.constorder of the constant model.
  • v.constinnovation variance of the constant model.
  • aic.constAIC of the constant model.

Details

The data of length $n$ are devided into $k$ locally stationary spans, $$|<-- n_1 -->|<-- n_2 -->|<-- n_3 -->| ..... |<-- n_k -->|$$ where $n_i$ ($i=1,\ldots,k$) denotes the number of basic spans, each of length span, which constitute the $i$-th locally stationary span. At each local span, the process is represented by a stationary autoregressive model.

References

G.Kitagawa and H.Akaike (1978) A Procedure for The Modeling of Non-Stationary Time Series. Ann. Inst. Statist. Math., 30, B, 351--363. H.Akaike, G.Kitagawa, E.Arahata and F.Tada (1979) Computer Science Monograph, No.11, Timsac78. The Institute of Statistical Mathematics.

Examples

Run this code
data(locarData)
  z <- mlocar(locarData, max.order=10, span=300, const=0)
  z$arcoef

Run the code above in your browser using DataLab