In: Statistics and Probability
Using R:
1. Generate AR(1), AR(2), MA(1), MA(2), and ARMA(1,1) processes with different parameter values, and draw ACF and PACF. Discuss the characteristics of ACF snd PACF for these processes.
2. Generate AR(1) process {X_t}. Compute the first difference Y_t = X_t - X_(t-1). Draw ACF and PACF of {Y_t}. What can you say about this process? Is it again a AR(1) process? What can you say in general?
3.For the AR(2) processes with the following parameters,
determine if AR(2) processes are stationary. Without drawing the
graphs, what can you say about ACFs.
(a) ϕ1=1.2, ϕ2=−0.2
(b) ϕ1=0.6, ϕ2=0.3
(c) ϕ1=1.2, ϕ2=−0.7
(d) ϕ1=−0.8, ϕ2=−0.7
4. For the process Xt = ϕXt−2+Zt, determine the range of ϕ for which the process is stationary.
solution (1) :
For the model equation (assumed parameter values), we generate a series of 100 observations, plot this series and check their ACF and PACF plots.
a) AR(1)
Model equation: Xt = 0.9 Xt − 1 + Wt
R code :
library(astsa)
x <- arima.sim(model = list(order = c(1, 0, 0), ar = .9), n =
100) # Generate 100 observations from the AR(1) model
plot(x) # Plot the generated data
acf2(x) # Plot the ACF and PACF
Characteristics :
ACF : tails off
PACF : cuts off after lag 1
b) AR(2)
Model equation: Xt =1.5Xt−1 − 0.75 Xt−2 + Wt
R code :
library(astsa)
x <- arima.sim(model = list(order = c(2, 0, 0), ar = c(1.5,
-.75)), n = 100)
plot(x)
acf2(x)
Characteristics :
ACF : tails off
PACF : cuts off after lag 2
c) MA(1)
Model equation: Xt = Wt − 0.8Wt−1
R code :
library(astsa)
x <- arima.sim(model = list(order = c(0, 0, 1), ma = -.8), n
= 100)
plot(x)
acf2(x)
Characteristics :
ACF : cuts off after lag 1
PACF : tails off
d) MA(2)
Model equation: Xt = Wt − 0.8Wt−1 + 0.5 Wt−2
R code :
library(astsa)
x <- arima.sim(model = list(order = c(0, 0, 2), ma = c(-.8,.5)),
n = 100)
plot(x)
acf2(x)
Characteristics :
ACF : cuts off after lag 2
PACF : tails off
d) ARMA(1,1)
Model equation: Xt = .4Xt−1 + Wt - .8Wt−1
R code :
library(astsa)
x <- arima.sim(model = list(order = c(1, 0, 1), ar = 0.4, ma = -
0.8), n = 100)
plot(x)
acf2(x)
Characteristics :
ACF : tails off
PACF : tails off