Last data update: 2014.03.03

R: Simulation from a multivariate AR(p) model
mAr.simR Documentation

Simulation from a multivariate AR(p) model

Description

Simulation from an m-variate AR(p) model

Usage

mAr.sim(w, A, C, N, ...)

Arguments

w

vector of intercept terms

A

matrix of AR coefficients

C

noise covariance matrix

N

length of output time series

...

additional arguments

Details

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

Value

returns a list containg the N simulated observations for each of the m time series

Author(s)

S. M. Barbosa

References

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.

Examples

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)

Results