Learn R Programming

timsac (version 1.3.0)

canarm: Canonical Correlation Analysis of Scalar Time Series

Description

Fit an ARMA model to stationary scalar time series through the analysis of canonical correlations between the future and past sets of observations.

Usage

canarm(y, lag=NULL, max.order=NULL, plot=TRUE)

Arguments

y
a univariate time series.
lag
maximum lag. Default is $2 \sqrt{n}$, where $n$ is the length of the time series y.
max.order
upper limit of AR order and MA order, must be less than or equal to lag. Default is lag.
plot
logical. If TRUE (default) parcor is plotted.

Value

  • arinitAR coefficients of initial AR model fitting by the minimum AIC procedure.
  • vinnovation vector.
  • aicAIC.
  • aicminminimum AIC.
  • order.maiceorder of minimum AIC.
  • parcorpartial autocorrelation.
  • nctotal number of case.
  • futurenumber of present and future variables.
  • pastnumber of present and past variables.
  • cweightfuture set canonical weight.
  • canocoefcanonical R.
  • canocoef2R-squared.
  • chisquarchi-square.
  • ndfN.D.F.
  • dicDIC.
  • dicminminimum DIC.
  • order.dicminorder of minimum DIC.
  • arcoefAR coefficients $a(i) (i = 1,...,p)$.
  • macoefMA coefficients $b(i) (i = 1,...,q)$.

Details

The ARMA model of stationary scalar time series $y(t) (t=1,...,n)$ is given by $$y(t) - a(1)y(t-1) - ...- a(p)y(t-p) = u(t) - b(1)u(t-1) - ... - b(q)u(t-q),$$ where $p$ is AR order and $q$ is MA order.

References

H.Akaike, E.Arahata and T.Ozaki (1975) Computer Science Monograph, No.5, Timsac74, A Time Series Analysis and Control Program Package (1). The Institute of Statistical Mathematics.

Examples

Run this code
# "arima.sim" is a function in "stats".
  # Note that the sign of MA coefficient is opposite from that in "timsac".
  y <- arima.sim(list(order=c(2,0,1), ar=c(0.64,-0.8), ma=c(-0.5)), n=1000)
  z <- canarm(y, max.order=30)
  z$arcoef
  z$macoef

Run the code above in your browser using DataLab