We will model the process
#Load the forecast package
library(forecast)
#Generate an AR1 process of length n (from Cowpertwait & Meltcalfe)
# Set up variables
set.seed(1234)
n <- 1000
x <- matrix(0,1000,1)
w <- rnorm(n)
# loop to create x
for (t in 2:n) x[t] <- 0.7...