Consider here some model,
We’ve seen in class that stationnarity of that time series, in the sense that and , was valid if the roots (in ) of the characteristic polyonomial – – were outside the unit circle.
To visualize this point, consider the following time series
To generate that time series, we need to generate a bivariate white noise, i.e. (not necessarily a diagonal matrix), and . For instance
> n=500 > r=0.7 > set.seed(1) > Z1=rnorm(n) > Z2=rnorm(n) > E1=Z1 > E2=r*Z1+sqrt(1-r^2)*Z2
To generate now our time series, use
> A=matrix(c(.7,.2,.4,.3),2,2) > X1=X2=rep(0,n) > for(t in 2:n){ + X1[t]=A[1,1]*X1[t-1]+A[1,2]*X2[t-1]+E1[t] + X2[t]=A[2,1]*X1[t-1]+A[2,2]*X2[t-1]+E2[t] + }
Here, we have
> plot(X1,type="l",col="red") > lines(X2,col="blue")
Those two time series seem to be stationnary. And, indeed,
> polyroot(c(1,-sum(diag(A)),det(A))) [1] 1.18+0i 6.51-0i > Mod(polyroot(c(1,-sum(diag(A)),det(A)))) [1] 1.18 6.51