# # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- a_t = c( 0.78, 0.91, 0.45, -0.78, -1.90, -2.10, -0.54, -1.05, 0.68, -3.77, -1.40, -1.77, 1.18, 0.02, 1.29, -1.30, -6.20, -1.89, 0.95, 1.49, 1.08, 2.02, 1.25, 0.52, 2.31, 1.64, 0.78, 1.99, 1.36 ) m = mean(a_t) s = sqrt(var(a_t)) #postscript("../../WriteUp/Graphics/Chapter8/prob_1_ats_plot.eps", onefile=FALSE, horizontal=FALSE) plot( a_t, pch=18, xlim=c(0,30), ylim=c(m-2*s,m+2*s) ) abline(h=m,col='green') abline(h=m-2*s,col='red') abline(h=m+2*s,col='red') #dev.off() #postscript("../../WriteUp/Graphics/Chapter8/prob_1_acf_plot.eps", onefile=FALSE, horizontal=FALSE) acf( a_t ) #dev.off()