ディッキー・フラー検定

Equation
y_{t}=\alpha y_{t-1}+u_{t},\;(t=2,3,\cdots,T)
$latex H_{0}:\alpha=1,\;H_{1}:\alpha<1&s=0$ 上記式を変形 $latex \Delta y_{t}=y_{t}-y_{t-1}&s=1$ $latex \Delta y_{t}=(\alpha-1) y_{t-1}+u_{t}&s=1$ $latex \Delta y_{t}=\delta y_{t-1}+u_{t}&s=1$ $latex H_{0}:\delta=0,\; H_{1}:\delta<0&s=0$ R
サンプル:バーナンキ前FRB議長在任期間中のアメリカの失業率
unrateusa1stdiffunrateusa

> library(tseries)
> tsunrate <- ts(dataset$unrate,start=c(2006,2),frequency=12)
> plot(tsunrate,main="Unemployment Rate in U.S.A since Bernanke",ylab="rate")
> difftsunrate <- diff(tsunrate)
> plot(difftsunrate,main="1st Diff.Unemployment Rate in U.S.A since Bernanke",ylab="rate")

> adf.test(tsunrate,k=0)

        Augmented Dickey-Fuller Test

data:  tsunrate
Dickey-Fuller = 0.8904, Lag order = 0, p-value = 0.99
alternative hypothesis: stationary

 警告メッセージ: 
In adf.test(tsunrate, k = 0) : p-value greater than printed p-value

> adf.test(difftsunrate,k=0)

        Augmented Dickey-Fuller Test

data:  difftsunrate
Dickey-Fuller = -6.3625, Lag order = 0, p-value = 0.01
alternative hypothesis: stationary

 警告メッセージ: 
In adf.test(difftsunrate, k = 0) : p-value smaller than printed p-value

参考文献
福地純一郎、伊藤有希(2011).『Rによる計量経済分析』.朝倉書店.186pp.

アプリケーション
R Core Team (2013). R: A language and environment for statistical computing.
R Foundation for Statistical Computing, Vienna, Austria.
URL http://www.R-project.org/.