Move and compute!
oopt = ani.options(ani.height = 500, ani.width = 600, outdir = getwd(), nmax = 50, title = "Demonstration of Moving Window Auto-Regression", description = "Compute the AR(1) coefficient for the data in the window and plot the confidence intervals. Repeat this step as the window moves.") ani.start() par(mar = c(2, 3, 1, 0.5), mgp = c(1.5, 0.5, 0)) mwar.ani(lty.rect = 3, pch = 21, col = "red", bg = "yellow",type='o') ani.stop() ani.options(oopt)
I wish I didn't make serious mistakes in computing the confidence intervals. Would somebody check it for me? Thanks!