Plots of Data from AR(p) and MA(q) models We will examine some plots of data that have been simulated from some known AR(p) and MA(q) models. Since the data are simulated, the acf values won't match exactly with the theoretical values; The acf values are estimated (we will talk about how the values are estimated later in the course). The main point of this handout is to get some feel of what a time series plot from common AR and MA models could look like. First, we create time series plots of data simulated from AR(1) models. In one case phi is positive, and in the second case it is negative. We use the Splus command "arima.sim" to simulate 100 observations from each model: ar1.sim <- arima.sim(100,model=list(ar=.8)) ar1.sim2 <- arima.sim(100,model=list(ar=-.8)) Now we plot these series: par(mfrow=c(2,2)) tsplot(ar1.sim) mtext("AR(1) with phi = 0.8") acf(ar1.sim) We see that the time series plot indicates some regular pattern: the series will increase over several consecutive time points, then decrease over several consecutive time points. The acf displays the general theoretical behaviour we discussed in class: the acf values are positive, but decaying to 0, at least for the first few lags. We also note the estimates are close to the theoretical values: If we plot the AR(1) model where phi is negative: tsplot(ar1.sim2) mtext("AR(1) with phi = -0.8") acf(ar1.sim2) we see the series "jumps around" a lot more: positive values are immediately followed by negative values, and so on. The acf oscillates between negative and positive values, as we showed theoretically in class.