#AR1 Series e<- rnorm(200) seq<- 1:200; Y<- 1:200; Y[1]<- 0 postscript(file="AR1plot.ps",height=16,width=10,horizontal=F) par(mfrow=c(2,1)) alph<- 0.66 for (i in 2:200) {Y[i]<- alph*Y[i-1] + e[i]} mean(Y) c(sqrt(var(Y)),sqrt(1/(1 - alph*alph))) plot(seq,Y,type="l",lty=1,xlim=c(0,200),ylim=c(-4,4),xlab="t", ylab="AR(1) Series") abline(h=c(-2,0,2),lty=2) title(main="AR(1) Processes",cex=0.85) text(170,-4,"a =",font=13); text(190,-4,alph) alph<- -0.66 for (i in 2:200) {Y[i]<- alph*Y[i-1] + e[i]} mean(Y) c(sqrt(var(Y)),sqrt(1/(1 - alph*alph))) plot(seq,Y,type="l",lty=1,xlim=c(0,200),ylim=c(-4,4),xlab="t", ylab="AR(1) Series") abline(h=c(-2,0,2),lty=2) text(170,-4,"a =",font=13); text(190,-4,alph) dev.off() rm(alph) rm(e,Y,seq)