mAr.sim | R Documentation |
Simulation from an m-variate AR(p) model
mAr.sim(w, A, C, N, ...)
w |
vector of intercept terms |
A |
matrix of AR coefficients |
C |
noise covariance matrix |
N |
length of output time series |
... |
additional arguments |
Simulation from an m-variate AR(p) model given by
X[t]=w + A1 X[t-1] +...+ Ap X[t-p] +e[t]
where
X[t]=[X1(t)...Xm(t)]' is a vector of length m
w is a m-length vector of intercept terms
A=[A1 ... Ap] is a m x mp matrix of autoregressive coefficients
e(t) is a m-length uncorrelated noise vector with mean 0 and m x m covariance matrix C
returns a list containg the N simulated observations for each of the m time series
S. M. Barbosa
Neumaier, A. and Schneider, T. (2001), Estimation of parameters and eigenmodes of multivariate autoregressive models. ACM Transactions on Mathematical Software, 27, 1, 27-57.
Schneider, T. and Neumaier, A. (2001), A Matlab package fo the estimation of parameters and eigenmodes of multivariate autoregressive models, 27, 1, 58-65.
Lutkepohl, H. (1993), Introduction to Multiple Time Series Analysis. Springer-Verlag, Berlin.
w=c(0.25,0.1) C=rbind(c(1,0.5),c(0.5,1.5)) A=rbind(c(0.4,1.2,0.35,-0.3),c(0.3,0.7,-0.4,-0.5)) x=mAr.sim(w,A,C,N=300)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.