Learn R Programming

timsac (version 1.3.0)

fpec: AR model Fitting for Control

Description

Perform AR model fitting for control.

Usage

fpec(y, max.order=NULL, control=NULL, manip=NULL)

Arguments

y
a multivariate time series.
max.order
upper limit of model order. Default is $2 \sqrt{n}$, where $n$ is the length of time series y.
control
controlled variables. Default is $c(1:d)$, where $d$ is the dimension of the time series y.
manip
manipulated variables. Default number of manipulated variable is $0$.

Value

  • covcovariance matrix rearrangement by inw.
  • fpecFPEC (AR model fitting for control).
  • rfpecRFPEC.
  • aicAIC.
  • orderminorder of minimum FPEC.
  • fpecminminimum FPEC.
  • rfpecminminimum RFPEC.
  • aicminminimum AIC.
  • perrprediction error covariance matrix.
  • arcoefa set of coefficient matrices. arcoef[i,j,k] shows the value of $i$-th row, $j$-th column, $k$-th order.

References

H.Akaike and T.Nakagawa (1988) Statistical Analysis and Control of Dynamic Systems. Kluwer Academic publishers.

Examples

Run this code
ar <- array(0,dim=c(3,3,2))
  ar[,,1] <- matrix(c(0.4,  0,   0.3,
                      0.2, -0.1, -0.5,
                      0.3,  0.1, 0),3,3,byrow=TRUE)
  ar[,,2] <- matrix(c(0,  -0.3,  0.5,
                      0.7, -0.4,  1,
                      0,   -0.5,  0.3),3,3,byrow=TRUE)
  x <- matrix(rnorm(200*3),200,3)
  y <- mfilter(x,ar,"recursive")
  fpec(y, max.order=10)

Run the code above in your browser using DataLab