====== Moving Window Auto-Regression ====== Move and compute! FIXME ===== Animation ===== Compute the AR(1) coefficient for the data in the window and plot the confidence intervals. Repeat this step as the window moves. ===== R code =====
library(animation)
saveHTML({
    (nmax = 50)
    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")
}, img.name = "mwar_ani", htmlfile = "mwar_ani.html", ani.options(ani.height = 500, 
    ani.width = 600, outdir = getwd()), title = "Demonstration of Moving Window Auto-Regression", 
    description = c("Compute the AR(1) coefficient for the data in the\nwindow and plot the confidence intervals. Repeat this step as the\nwindow moves."))
===== Notes ===== I wish I didn't make serious mistakes in computing the confidence intervals. Would somebody check it for me? Thanks!