時系列の最初の違いに関して、拡張ディッキーフラー回帰の決定論的な用語を指定するには、時系列のレベルのドリフトと(パラメトリック/線形)傾向を考慮する必要があります。混乱は、あなたがした方法で最初の差分方程式を導き出すことから正確に起こります。
(拡張)ディッキーフラー回帰モデル
一連のレベルがドリフト及び動向用語を含むと仮定する
、この場合の非定常性の帰無仮説は次のようになりH 0
Yt=β0,l+β1,lt+β2,lYt−1+εt
。
H0:β2,l=1
このデータ生成処理[DGP]によって暗示最初差異の1つの方程式は、あなたが由来していること一つである
しかし、これはテストで使用されている(拡張された)Dickey Fuller回帰ではありません。
ΔYt=β1,l+β2,lΔYt−1+Δεt
代わりに、正しいバージョンを減算することにより得られるで得られた最初の式の両辺から
Δ Y TYt−1
ΔYt=β0,l+β1,lt+(β2,l−1)Yt−1+εt≡β0,d+β1,dt+β2,dYt−1+εt
H0:β2,d=0 which is just a t-test using the OLS estimate of
β2,d in the regression above. Note that the drift and trend come through to this specification unchanged.
An additional point to note is that if you are not certain about the presence of the linear trend in the levels of the time series, then you can jointly test for the linear trend and unit root, that is, H0:[β2,d,β1,l]′=[0,0]′, which can be tested using an F-test with appropriate critical values. These tests and critical values are produced by the R function ur.df
in the urca
package.
Let us consider some examples in detail.
Examples
1. Using the US investment series
The first example uses the US investment series which is discussed in Lutkepohl and Kratzig (2005, pg. 9). The plot of the series and its first difference are given below.
From the levels of the series, it appears that it has a non-zero mean, but does not appear to have a linear trend. So, we proceed with an augmented Dickey Fuller regression with an intercept, and also three lags of the dependent variable to account for serial correlation, that is:
ΔYt=β0,d+β2,dYt−1+∑j=13γjΔYt−j+εt
Note the key point that I have looked at the levels to specify the regression equation in differences.
The R code to do this is given below:
library(urca)
library(foreign)
library(zoo)
tsInv <- as.zoo(ts(as.data.frame(read.table(
"http://www.jmulti.de/download/datasets/US_investment.dat", skip=8, header=TRUE)),
frequency=4, start=1947+2/4))
png("USinvPlot.png", width=6,
height=7, units="in", res=100)
par(mfrow=c(2, 1))
plot(tsInv$USinvestment)
plot(diff(tsInv$USinvestment))
dev.off()
# ADF with intercept
adfIntercept <- ur.df(tsInv$USinvestment, lags = 3, type= 'drift')
summary(adfIntercept)
The results indicate that the the null hypothesis of nonstationarity can be rejected for this series using the t-test based on the estimated coefficient. The joint F-test of the intercept and the slope coefficient (H:[β2,d,β0,l]′=[0,0]′) also rejects the null hypothesis that there is a unit root in the series.
2. Using German (log) consumption series
The second example is using the German quarterly seasonally adjusted time series of (log) consumption. The plot of the series and its differences are given below.
From the levels of the series, it is clear that the series has a trend, so we include the trend in the augmented Dickey-Fuller regression together with four lags of the first differences to account for the serial correlation, that is
ΔYt=β0,d+β1,dt+β2,dYt−1+∑j=14γjΔYt−j+εt
The R code to do this is
# using the (log) consumption series
tsConsump <- zoo(read.dta("http://www.stata-press.com/data/r12/lutkepohl2.dta"), frequency=1)
png("logConsPlot.png", width=6,
height=7, units="in", res=100)
par(mfrow=c(2, 1))
plot(tsConsump$ln_consump)
plot(diff(tsConsump$ln_consump))
dev.off()
# ADF with trend
adfTrend <- ur.df(tsConsump$ln_consump, lags = 4, type = 'trend')
summary(adfTrend)
The results indicate that the null of nonstationarity cannot be rejected using the t-test based on the estimated coefficient. The joint F-test of the linear trend coefficient and the slope coefficient (H:[β2,d,β1 、l]′= [ 0 、0 ]′)は、非定常性のヌルを拒否できないことも示します。
3.与えられた温度データを使用する
これで、データのプロパティを評価できます。レベルと最初の違いの通常のプロットを以下に示します。
これらは、データにインターセプトとトレンドがあることを示しているため、次のRコードを使用して、ADFテストを実行します(遅延した最初の差分項なし)。
# using the given data
tsTemp <- read.table(textConnection("temp
64.19749
65.19011
64.03281
64.99111
65.43837
65.51817
65.22061
65.43191
65.0221
65.44038
64.41756
64.65764
64.7486
65.11544
64.12437
64.49148
64.89215
64.72688
64.97553
64.6361
64.29038
65.31076
64.2114
65.37864
65.49637
65.3289
65.38394
65.39384
65.0984
65.32695
65.28
64.31041
65.20193
65.78063
65.17604
66.16412
65.85091
65.46718
65.75551
65.39994
66.36175
65.37125
65.77763
65.48623
64.62135
65.77237
65.84289
65.80289
66.78865
65.56931
65.29913
64.85516
65.56866
64.75768
65.95956
65.64745
64.77283
65.64165
66.64309
65.84163
66.2946
66.10482
65.72736
65.56701
65.11096
66.0006
66.71783
65.35595
66.44798
65.74924
65.4501
65.97633
65.32825
65.7741
65.76783
65.88689
65.88939
65.16927
64.95984
66.02226
66.79225
66.75573
65.74074
66.14969
66.15687
65.81199
66.13094
66.13194
65.82172
66.14661
65.32756
66.3979
65.84383
65.55329
65.68398
66.42857
65.82402
66.01003
66.25157
65.82142
66.08791
65.78863
66.2764
66.00948
66.26236
65.40246
65.40166
65.37064
65.73147
65.32708
65.84894
65.82043
64.91447
65.81062
66.42228
66.0316
65.35361
66.46407
66.41045
65.81548
65.06059
66.25414
65.69747
65.15275
65.50985
66.66216
66.88095
65.81281
66.15546
66.40939
65.94115
65.98144
66.13243
66.89761
66.95423
65.63435
66.05837
66.71114"), header=T)
tsTemp <- as.zoo(ts(tsTemp, frequency=1))
png("tempPlot.png", width=6,
height=7, units="in", res=100)
par(mfrow=c(2, 1))
plot(tsTemp$temp)
plot(diff(tsTemp$temp))
dev.off()
# ADF with trend
adfTrend <- ur.df(tsTemp$temp, type = 'trend')
summary(adfTrend)
t検定とF検定の両方の結果は、温度系列に対して非定常性のヌルを拒否できることを示しています。問題が多少明確になることを願っています。