Simulate a nonstationary time series with n = 60 according to the model ARIMA(0,
ID: 3217028 • Letter: S
Question
Simulate a nonstationary time series with n = 60 according to the model
ARIMA(0,1,1) with = 0.8.
(a) Perform the (augmented) Dickey-Fuller test on the series with k = 0 in Equation
Yt – Yt – 1 = ( – 1)Yt – 1 + Xt
aYt – 1 1Xt – 1
… = + + + kXt – k + et
aYt – 1 1(Yt – 1 – Yt – 2) … = + + + k(Yt – k – Yt – k – 1) + et
(With k = 0, this is the Dickey-Fuller test and is not
augmented.) Comment on the results.
(b) Perform the augmented Dickey-Fuller test on the series with k chosen by the
software—that is, the “best” value for k. Comment on the results.
(c) Repeat parts (a) and (b) but use the differences of the simulated series. Comment
on
Explanation / Answer
rm(list=ls(all=TRUE))
library(tseries)
x=arima.sim(n = 60, list(ar = c(0,0.8), ma = c(0,1)),sd = 1)
df=adf.test(x, k = 0)
adf=adf.test(x, k = 10)
df
Augmented Dickey-Fuller Test
data: x
Dickey-Fuller = -6.5712, Lag order = 0, p-value = 0.01
alternative hypothesis: stationary
The p-value is less than 0.05, we reject the null hypothesis and conclude that there is no unit root
> adf
Augmented Dickey-Fuller Test
data: x
Dickey-Fuller = -2.6254, Lag order = 10, p-value = 0.322
alternative hypothesis: stationary
The p-value is greater than 0.05, we could not reject the null hypothesis and conclude that there is a unit root