# # Written by: # -- # John L. Weatherwax 2006-08-28 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- N = 1000; u_t = rnorm(N,mean=0,sd=1); # the original sequence #postscript("../../WriteUp/Graphics/Chapter4/sect_7_prob_2_u_k.eps", onefile=FALSE, horizontal=FALSE) acf( u_t ); #dev.off() x_t = c() x_t[1] = u_t[1]; for( ii in 2:N ){ x_t[ii] = 0.7 * x_t[ii-1] + u_t[ii]; } #postscript("../../WriteUp/Graphics/Chapter4/sect_7_prob_2_x_t.eps", onefile=FALSE, horizontal=FALSE) acf( x_t ); #dev.off()