# Generate several time series
samp1 <- arima.sim(list(ma = c(0.8, 0.3)), n = 100, sd = sqrt(2))
samp2 <- arima.sim(list(ar = c(0.8,-0.3)), n = 100, sd = sqrt(2))
samp3 <- arima.sim(list(ar = c(0.8, -0.3), ma = c(0.6, -0.4)), n = 100, sd = sqrt(2))
plot(samp1)
plot(samp2)
plot(samp3)
par(mfrow=c(3,1))
acf(samp1)
acf(samp2)
acf(samp3)
#
# If the PACF displays a sharp cutoff while the ACF decays
# more slowly (i.e., has significant spikes at higher lags), we
# say that the series displays an "AR signature???
# The lag at which the PACF cuts off is the indicated number of
# AR terms -- p!
#
#
# If the ACF of the differenced series displays a sharp cutoff
# and/or the lag-1 autocorrelation is negative then consider
# adding an MA term to the model
# The lag at which the ACF cuts off is the indicated number of
# MA terms
#