Anda di halaman 1dari 34

Earlier tests for multiple orders of autocorrelation The BoxPierce test

Earlier tests for multiple orders of autocorrelation

Tes pertama untuk autokorelasi, berdasarkan alternatif model AR (1) dari


proses kesalahan, hanya mempertimbangkan kemungkinan keberangkatan
dari kemerdekaan. Dari sudut pandang pedagogis, tes semacam itu
berbahaya, karena kegagalan untuk menolak dapat dianggap sebagai
tagihan kesehatan yang bersih, yang menyiratkan tidak adanya korelasi
serial: yang sebenarnya tidak.

Tes Box-Pierce portmanteau (atau Q), yang dikembangkan pada tahun 1970,
dapat diterapkan pada rangkaian waktu univariat, dan sering dianggap
sebagai tes umum untuk 'white noise': demikian namanya di Stata, wntestq.
Uji coba yang dilakukan oleh komando tersebut adalah penyempurnaan
yang diajukan oleh Ljung dan Box (1978), menerapkan koreksi sampel kecil.

Namun, jika uji portmanteau diterapkan pada satu set residu regresi,
regresor dalam model diasumsikan benar-benar eksogen dan
homoskedastis
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 1 / 44
Earlier tests for multiple orders of autocorrelation The BoxPierce test

Sebagai ilustrasi, kita menghitung statistik Q untuk satu lag, dan


menggambarkan perhitungannya melalui aktest. Opsi bp menentukan uji Q,
dan kecil menunjukkan bahwa bentuk Ljung-Box statistik, dengan koreksi
sampel kecilnya, harus dihitung. Tanpa pilihan kecil, statistik Box-Pierce
yang asli akan dihitung.
. wntestq air, lags (1) Uji portmanteau untuk white noise

Portmanteau (Q) statistic = 132.1415


Prob > chi2(1) = 0.0000
. actest air, lags(1) bp small
Cumby-Huizinga test for autocorrelation H0: variable
is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=0 (serially uncorrelated)
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1 - 1 132.142 1 0.0000 1 132.142 1 0.0000

Test requires conditional homoskedasticity

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 2 / 44
Earlier tests for multiple orders of autocorrelation The BoxPierce test

Seperti yang dapat Anda lihat dari keluaran, actest secara otomatis
menampilkan statistik uji untuk semua kelambatan yang ditentukan, serta
uji untuk setiap urutan lag. Dalam kasus single-lag, ini identik. Hipotesis nol
adalah bahwa variabel yang diuji adalah proses rata-rata bergerak order q:
MA (q). Secara default, q = 0, menyiratkan white noise. Alternatif yang
dipertimbangkan adalah bahwa korelasi serial hadir dalam rentang lag, atau
untuk lag yang ditentukan tersebut.

Untuk satu lag, statistik portmanteau Ljung-Box identik dengan statistik uji
Cumby-Huizinga (C-H). Kami juga dapat menerapkan setiap tes untuk
berbagai urutan lag:
. wntestq air, lags(4)
Portmanteau test for white noise
Portmanteau (Q) statistic = 427.7387
Prob > chi2(4) = 0.0000

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 3 / 44
Earlier tests for multiple orders of autocorrelation The BoxPierce test

. actest air, lags(4) bp small


Cumby-Huizinga test for autocorrelation
H0: variable is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=0 (serially uncorrelated)
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1- 1 132.142 1 0.0000 1 132.142 1 0.0000


1 - 2 245.646 2 0.0000 2 113.505 1 0.0000
1 - 3 342.675 3 0.0000 3 97.029 1 0.0000
1- 4 427.739 4 0.0000 4 85.064 1 0.0000

Test membutuhkan homo kondisional


Untuk kisaran lags 1-4, statistik C-H identik dengan Kotak Ljung Q yang dilaporkan oleh wntestq. Panel kanan
juga menunjukkan bahwa korelasi serial ada pada setiap lag. Temuan tersebut tidak dapat diproduksi dengan
uji B-P-L-B, karena hipotesis nolnya mengasumsikan tidak adanya autokorelasi sama sekali.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 4 / 44
Earlier tests for multiple orders of autocorrelation The BreuschGodfrey test

Uji Breusch-Godfrey, yang dikembangkan secara independen oleh kedua


penulis pada tahun 1978, dimaksudkan untuk diterapkan pada serangkaian
residu regresi dengan asumsi regresor eksogen, atau yang telah ditentukan
sebelumnya. Meskipun penerapannya di official stata as estate bgodfrey
mengklasifikasikannya sebagai perintah post-estimation, namun
penerapannya dapat dilakukan pada rangkaian waktu tunggal dengan
menurunkan seri tersebut secara konstan:

lags(p) chi2 df Prob > chi2

1 130.900 1 0.0000

H0: no serial correlation

In this case, the regressor (the units vector)


is of course strictly exogenous.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 5 / 44
Earlier tests for multiple orders of autocorrelation The BreuschGodfrey test

Akte kita juga berfungsi sebagai perintah post-estimation, sehingga jika


tidak ada varname yang ditentukan, ia beroperasi pada rangkaian sisa dari
perintah estimasi terakhir:
. actest, lags(1)
Cumby-Huizinga test for autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=specified lag-1
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1 - 1 130.900 1 0.0000 1 130.900 1 0.0000

Test allows predetermined regressors/instruments Test requires conditional


homoskedasticity

The actest statistic is identical to that produced by the B-G test.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 6 / 44
Earlier tests for multiple orders of autocorrelation The BreuschGodfrey test

Keuntungan dari uji B-G selama pengujian AR (1) adalah bahwa hal itu
dapat diterapkan untuk menguji hipotesis nol mengenai berbagai urutan
lag:
. estat bgodfrey, lags(4)
Breusch-Godfrey LM test for autocorrelation

lags(p) chi2 df Prob > chi2

4 132.364 4 0.0000

H0: no serial correlation

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 7 / 44
Earlier tests for multiple orders of autocorrelation The BreuschGodfrey test

Kami dapat mereproduksi hasil uji B-G dengan actest untuk jumlah lag yang sama:

. actest, lags(4)
Cumby-Huizinga test for autocorrelation

H0: disturbance is MA process up to order q


HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=specified lag-1
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1- 1 130.900 1 0.0000 1 130.900 1 0.0000


1- 2 131.954 2 0.0000 2 40.202 1 0.0000
1- 3 132.208 3 0.0000 3 22.708 1 0.0000
1- 4 132.364 4 0.0000 4 15.970 1 0.0001

Test allows predetermined regressors/instruments


Test requires conditional homoskedasticity

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 8 / 44
Earlier tests for multiple orders of autocorrelation The BreuschGodfrey test

Statistik aktest untuk kisaran lags 1-4 identik dengan statistik B-G.
Perhatikan bahwa pada panel sebelah kanan, null untuk setiap lag tertentu
adalah prosesnya adalah MA (lag - 1) daripada MA (lag).
Hipotesis ini tidak dapat diuji oleh B-G, karena dengan hipotesis nol tidak
ada autokorelasi pada urutan lag. Tidak masuk akal untuk menguji
autokorelasi, katakanlah, pada lag ke-4 sambil mengasumsikan bahwa itu
tidak ada pada urutan lag yang lebih rendah.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 9 / 44
Earlier tests for multiple orders of autocorrelation The BreuschGodfrey test

Namun, tes B-P-L-B dan B-G, dan uji C-H dalam bentuk standarnya,
semuanya didasarkan pada homoseksualitas bersyarat dari proses
kesalahan. Kita dapat mengendurkan asumsi ini secara aktif dengan
menentukan opsi kuat:
. actest, lags(4) robust
Cumby-Huizinga test for autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=specified lag-1
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1- 1 55.852 1 0.0000 1 55.852 1 0.0000


1- 2 59.940 2 0.0000 2 20.886 1 0.0000
1- 3 63.790 3 0.0000 3 13.761 1 0.0002
1- 4 65.304 4 0.0000 4 10.526 1 0.0012

Test allows predetermined regressors/instruments Test robust to


heteroskedasticity

Tes untuk lag order 1-4 lagi sangat menolak null of independence
dalam seri, seperti halnya uji pada setiap lag individu.
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 10 / 44
The CumbyHuizinga test in perspective Testing for independence in regression residuals

The CumbyHuizinga test in perspective

Dalam masing-masing contoh ini, kami telah melakukan tes pada rangkaian
waktu univariat. Setiap tes dapat diterapkan pada residual model regresi
non-trivial dengan asumsi eksogenitas ketat (B-P-L-B), atau regresor
eksogen atau regresor yang lemah (B-G):
. qui reg air time
. qui predict double airhat, residual
. wntestq airhat, lags(4) Portmanteau test for white noise

Portmanteau (Q) statistic = 107.6173


Prob > chi2(4) = 0.0000

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 11 / 44
The CumbyHuizinga test in perspective Testing for independence in regression residuals

To reproduce these results with actest, we must also employ the


strict option to specify that the regressors are assumed to be
strictly exogenous:
. actest, lags(4) bp small strict Cumby-Huizinga test for autocorrelation

H0: disturbance is MA process up to order q


HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=0 (serially uncorrelated)
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1- 1 77.958 1 0.0000 1 77.958 1 0.0000


1- 2 90.266 2 0.0000 2 12.308 1 0.0005
1- 3 91.425 3 0.0000 3 1.159 1 0.2816
1- 4 107.617 4 0.0000 4 16.192 1 0.0001

Test requires strictly exogenous regressors/instruments Test requires


conditional homoskedasticity

The actest statistic for lag orders 14 is identical to the Q statistic.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 12 / 44
The CumbyHuizinga test in perspective Allowing for predetermined regressors

Statistik B-P-L-B dapat dimodifikasi untuk memungkinkan regresor eksogen


yang ditentukan sebelumnya namun tidak ketat. Seperti yang ditunjukkan
Hayashi di buku teksnya (halaman 146-147), ini memerlukan
'predeterminedness' dan bentuk homogen kondisional yang kuat: bahwa
harapan akan kesalahan dikondisikan pada kedua sejarahnya sendiri dan
sejarah regresor adalah nol, dan bahwa harapan kesalahan kuadrat di
bawah sama

pengkondisian adalah 2. Hayashi menyebut ini 'modified Box-Pierce Q',


dan menunjukkan bahwa secara asimtotik setara dengan statistik uji B-G.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 13 / 44
The CumbyHuizinga test in perspective Allowing for predetermined regressors

We demonstrate the equivalency between B-G and actest:


. estat bgodfrey, lags(4)
Breusch-Godfrey LM test for autocorrelation
lags(p) chi2 df Prob > chi2

4 95.947 4 0.0000

H0: no serial correlation


. actest, lags(4)
Cumby-Huizinga test for autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=specified lag-1
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1- 1 76.740 1 0.0000 1 76.740 1 0.0000


1- 2 94.492 2 0.0000 2 5.936 1 0.0148
1- 3 95.007 3 0.0000 3 0.511 1 0.4748
1- 4 95.947 4 0.0000 4 7.218 1 0.0072

Test allows predetermined regressors/instruments


Test requires conditional homoskedasticity

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 14 / 44
The CumbyHuizinga test in perspective Allowing for predetermined regressors

The equivalency also holds for predetermined, or weakly exogenous,


regressors in this AR(2) model:
. qui reg air L(1/2).air
. estat bgodfrey, lags(4)
Breusch-Godfrey LM test for autocorrelation
lags(p) chi2 df Prob > chi2

4 15.506 4 0.0038

H0: no serial correlation


. actest, lags(4)
Cumby-Huizinga test for autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=specified lag-1
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1- 1 5.409 1 0.0200 1 5.409 1 0.0200


1- 2 7.979 2 0.0185 2 2.578 1 0.1084
1- 3 12.490 3 0.0059 3 1.755 1 0.1853
1- 4 15.506 4 0.0038 4 7.387 1 0.0066

Test allows predetermined regressors/instruments


Test requires conditional homoskedasticity

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 15 / 44
The CumbyHuizinga test in perspective Allowing for MA(q) errors, q > 0

Di luar kemampuan untuk menghitung versi uji yang kuat, memungkinkan


heteroskedastisitas bersyarat, kerangka kerja C-H juga memungkinkan kita
untuk mempertimbangkan hipotesis nol yang memungkinkan korelasi
serial pada urutan lag yang lebih rendah. Sebagai ilustrasi, kita asumsikan
bahwa proses error adalah MA (2) dibawah null:
. actest, lags(3 4)
Cumby-Huizinga test for autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q

H0: disturbance is MA(q), q=2 H0: q=specified lag-1


HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

3 - 3 1.755 1 0.1853 3 1.755 1 0.1853


3 - 4 9.046 2 0.0109 4 7.387 1 0.0066

Test allows predetermined regressors/instruments Test requires conditional


homoskedasticity

For lag orders 34, the null that the residuals are MA(2) rather than
MA(4) is rejected.
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 16 / 44
The CumbyHuizinga test in perspective Allowing for MA(q) errors, q > 0

Kemampuan untuk memungkinkan korelasi serial tingkat rendah


menyiratkan bahwa kerangka uji CH jauh lebih fleksibel daripada pengujian
sebelumnya, yang semuanya tidak mengasumsikan adanya korelasi serial
di bawah nol: dalam istilah actest, bahwa q = 0. Mengizinkan MA ( q) di
bawah null memerlukan penggunaan VCE kernel-robust, yang merupakan
kernel terpotong dengan bandwidth yang disetel ke q.

Hayashi menunjukkan bahwa kernel terpotong adalah kernel alami yang


digunakan saat autokorelasi mati pada jeda yang telah ditentukan,
menghindarkan kebutuhan akan asimtotik T besar saat bandwidth
meningkat dengan T. Seperti pada ivreg2 Baum-Schaffer-Stillman, default
saat menggunakan opsi kernel () atau bw () adalah menghitung ACCE-
robust VCE. Untuk menghitung HAC VCE, opsi kuat juga harus ditentukan.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 17 / 44
The CumbyHuizinga test in perspective Allowing for MA(q) errors, q > 0

Fitur lain yang berguna dari kerangka pengujian C-H adalah dapat memberi
kita wawasan yang lebih besar mengenai bentuk ketergantungan dalam
proses kesalahan. Misalnya, jika kita melihat regresi ini dengan uji B-G
. qui reg investment L(1/4).income
. estat bgodfrey, lags(1/8)
Breusch-Godfrey LM test for autocorrelation

lags(p) chi2 df Prob > chi2

1 64.511 1 0.0000
2 64.601 2 0.0000
3 64.641 3 0.0000
4 64.641 4 0.0000
5 65.147 5 0.0000
6 65.438 6 0.0000
7 65.750 7 0.0000
8 66.566 8
H0: no serial correlation 0.0000

We conclude that there is serious autocorrelation at all lag lengths.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 18 / 44
The CumbyHuizinga test in perspective Allowing for MA(q) errors, q > 0

However, consider the right-hand panel of the equivalent actest


results:
. actest, lags(8)
Cumby-Huizinga test for autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=specified lag-1
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1- 1 64.511 1 0.0000 1 64.511 1 0.0000


1 - 2 64.601 2 0.0000 2 18.232 1* 0.0000
1 - 3 64.641 3 0.0000 3 9.245 1* 0.0024
1 - 4 64.641 4 0.0000 4 5.799 1 0.0160
1 - 5 65.147 5 0.0000 5 3.211 1 0.0731
1 - 6 65.438 6 0.0000 6 1.402 1 0.2364
1 - 7 65.750 7 0.0000 7 0.388 1 0.5335
1 - 8 66.566 8 0.0000 8 0.002 1 0.9617

Test allows predetermined regressors/instruments


Test requires conditional homoskedasticity
* Eigenvalues adjusted to make matrix positive semidefinite

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 19 / 44
The CumbyHuizinga test in perspective Allowing for MA(q) errors, q > 0

Dalam kasus ini, kita dapat melihat bahwa meskipun uji gabungan perintah
lag semua ditolak, uji MA (4) vs MA (5) tidak dapat ditolak pada tingkat
95%. Ini menunjukkan bahwa kesimpulan dari uji B-G sangat dipengaruhi
oleh autokorelasi yang jelas pada lags 1-4, dan mungkin membawa kita
untuk memasukkan lebih banyak lag daripada yang diperlukan dalam
estimator HAC VCE.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 20 / 44
The CumbyHuizinga test in perspective Testing for serial correlation in an instrumental variables context

Kerangka kerja C-H juga merilekskan asumsi regresor yang telah ditentukan
sebelumnya, seperti dalam konteks IV, persyaratan untuk
predeterminedness diterapkan pada instrumen daripada regresor.
Menggambarkan:
. webuse lutkepohl, clear
(Quarterly SA West German macro data, Bil DM, from Lutkepohl 1993 Table E.1)
. qui ivreg2 investment (income = L(1/2).income)
. actest, lags(3)
Cumby-Huizinga test for autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=specified lag-1
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1 - 1 68.947 1 0.0000 1 68.947 1 0.0000


1 - 2 69.029 2 0.0000 2 21.716 1 0.0000
1 - 3 69.182 3 0.0000 3 12.362 1 0.0004

Test allows predetermined regressors/instruments


Test requires conditional homoskedasticity

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 21 / 44
The CumbyHuizinga test in perspective Testing for serial correlation in an instrumental variables context

We may also conduct this test as heteroskedasticity-robust:


. actest, lags(3) robust
Cumby-Huizinga test for autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=specified lag-1
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1 - 1 37.402 1 0.0000 1 37.402 1 0.0000


1 - 2 37.616 2 0.0000 2 12.128 1 0.0005
1 - 3 37.631 3 0.0000 3 7.003 1 0.0081

Test allows predetermined regressors/instruments Test robust to


heteroskedasticity

In both forms of the test, the null hypothesis is overwhelmingly


rejected.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 22 / 44
CumbyHuizinga test vs. ArellanoBond test The abar test

CumbyHuizinga test vs. ArellanoBond test

Arellano dan Bond (1991) memperkenalkan sebuah tes untuk autokorelasi dalam
estimasi data panel dinamis (DPD) untuk T tetap, konteks N yang besar yang
didukung oleh xtabond dkk. Roodman (2004, 2012) menerapkan ini sebagai uji
standalone, abar.

Tes AB awalnya dirancang untuk model DPD, dimana ada AR (1) (sebenarnya, MA
(1)) hadir dalam kesalahan yang berbeda karena konstruksi, adanya AR yang
signifikan (2) adalah uji diagnostik terhadap validitas instrumen, melengkapi tes
Sargan-Hansen standar untuk pembatasan yang terlalu banyak. Dalam konteks ini,
null memungkinkan untuk AR (1) (q> 0 dalam istilah C-H) saat menguji AR (2), AR
(3) ...

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 23 / 44
CumbyHuizinga test vs. ArellanoBond test The abar test

Roodman mencatat bahwa tes ini 'cukup umum dalam penerapannya-lebih


general than dwstat
bahwa 'hal itu dapat diterapkan pada regresi GMM linier secara umum, dan
dengan demikian kasus khusus OLS dan 2SLS.'

Uji abar dapat diterapkan setelah regresi, ivreg, ivregress dan ivreg2 (Baum-
Schaffer-Stillman) untuk bentuk perintah homoseksual, robust, dan cluster-
robust, serta regresi dengan HAC VCE yang diperkirakan oleh newey,
newey2 (Roodman ), ivregress dan ivreg2. Ini dapat diterapkan pada model
efek tetap yang diperkirakan dengan perintah ini, namun tidak sesuai untuk
model efek tetap dengan asimtotik N besar-N tetap (Wooldridge, MIT Press,
hlm.
310-311).

1
abar help file
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 24 / 44
CumbyHuizinga test vs. ArellanoBond test Equivalence of the tests

Tes A-B yang diimplementasikan pada model DPD linier pada dasarnya
adalah uji C-H dalam konteks panel. Jadi, ada persamaan umum antara uji
abar yang diterapkan pada regresi OLS, 2SLS atau IV-GMM dan uji C-H yang
dilaksanakan oleh actest.

Beberapa perbedaan ada, sebagai default acten ke versi uji coba C-H AC-
robust, mendukung kernel terpotong. Sedangkan abar melaporkan uji
korelasi serial pada pesanan lag individual saja, actest juga melaporkan tes
pada rentang order lag. Kecuali ditentukan secara eksplisit dalam estimasi
awal, uji abar mengasumsikan tidak ada autokorelasi di bawah nol (q = 0).

Sebaliknya, saat menguji lag tertentu q, actest memungkinkan autokorelasi


(dalam bentuk MA (q - 1)) pada urutan lag yang lebih rendah. Perilaku
default abar ini membuatnya kurang menarik daripada actest, karena kita
mungkin sering ingin mengakomodasi autokorelasi pada urutan lag yang
lebih rendah dan tidak menganggap ketidakhadirannya.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 25 / 44
CumbyHuizinga test vs. ArellanoBond test Classical VCE

Kami menggambarkan kesetaraan ini dengan menguji AR (1) ... AR (4)


dengan abar mengikuti regresi OLS dengan VCE klasik. Statistik abar adalah
standar Normal di bawah nol, jadi kami mengkonversikan hasil yang
dilaporkan ke 2 tes.
. qui reg investment income
. abar, lags(4)
Warning: The Arellano-Bond test is only valid for time series only if they are
> ergodic.

Arellano-Bond test for AR(1): z = 8.33 Pr > z = 0.0000


Arellano-Bond test for AR(2): z = 7.43 Pr > z = 0.0000
Arellano-Bond test for AR(3): z = 6.77 Pr > z = 0.0000
Arellano-Bond test for AR(4): z = 5.73 Pr > z = 0.0000
. forv i=1/4 {
2. loc ar`i = r(ar`i)^2 * e(N)/e(df_r)
3. loc dia "`dia `ar`i"
4. }
. di "`dia"
70.90516463704326 56.45707136113094 46.89961653711498 33.59539738062808

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 26 / 44
CumbyHuizinga test vs. ArellanoBond test Classical VCE

Untuk membandingkan dengan actest, kami menggunakan opsi q0,


yang menentukan bahwa tidak ada korelasi serial yang diasumsikan
di bawah nol untuk uji lag-order individual:
. actest, lags(4) q0
Cumby-Huizinga test for autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=0 (serially uncorrelated)
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1- 1 70.905 1 0.0000 1 70.905 1 0.0000


1- 2 70.973 2 0.0000 2 56.457 1 0.0000
1- 3 71.083 3 0.0000 3 46.900 1 0.0000
1- 4 71.881 4 0.0000 4 33.595 1 0.0000

Test allows predetermined regressors/instruments Test requires conditional


homoskedasticity

The abar statistics are equal to those in the right-hand panel above.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 27 / 44
CumbyHuizinga test vs. ArellanoBond test HAC VCE

Kami juga dapat menggunakan tes ini setelah estimasi HAC yang kuat atau
HAC. Dalam kasus terakhir, kami menggunakan kernel Bartlett seperti yang
digunakan pada estimator HAC Newey-West. Bandwidth = 5 dalam istilah
ivreg2 menyiratkan empat lag di kernel.
. qui ivreg2 investment income, robust kernel(bartlett) bw(5)
. abar, lags(4)
Warning: The Arellano-Bond test is only valid for time series only if they are
> ergodic.

Arellano-Bond test for AR(1): z = 3.01 Pr > z = 0.0026


Arellano-Bond test for AR(2): z = 2.86 Pr > z = 0.0042
Arellano-Bond test for AR(3): z = 2.72 Pr > z = 0.0065
Arellano-Bond test for AR(4): z = 2.43 Pr > z = 0.0151
. forv i=1/4 {
2. loc ar`i = r(ar`i)^2
3. loc dia "`dia `ar`i"
4. }
. di "`dia"
9.041350773390105 8.191274390789095 7.403328244433819 5.9082939073147

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 28 / 44
CumbyHuizinga test vs. ArellanoBond test HAC VCE

Untuk membandingkan dengan actest, kita menambahkan kernel () dan bw ()


pilihan untuk menunjukkan bahwa tes harus dihitung dalam konteks HAC:

. actest, lags(4) q0 robust kernel(bartlett) bw(5) Cumby-Huizinga test for


autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=0 (serially uncorrelated)
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1- 1 9.041 1 0.0026 1 9.041 1 0.0026


1- 2 9.380 2 0.0092 2 8.191 1 0.0042
1- 3 9.628 3 0.0220 3 7.403 1 0.0065
1- 4 9.643 4 0.0469 4 5.908 1 0.0151

Test allows predetermined regressors/instruments Test robust to


heteroskedasticity

The abar statistics are equal to those in the right-hand panel above.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 29 / 44
CumbyHuizinga test vs. ArellanoBond test Application in a panel context

Kami juga dapat menerapkan tes dalam konteks panel menggunakan


OLS gabungan:
. webuse abdata, clear
. qui reg n w k, clu(id)
. abar, lags(3)

Arellano-Bond test for AR(1): z = 5.92 Pr > z = 0.0000


Arellano-Bond test for AR(2): z = 5.76 Pr > z = 0.0000
Arellano-Bond test for AR(3): z = 5.62 Pr > z = 0.0000
. forv i=1/3 {
2. loc ar`i = r(ar`i)^2
3. loc dia "`dia `ar`i"
4. }
. di "`dia"
35.01428083793625 33.12713487950008 31.63010894000373

The abar test in this context is robust to within-panel autocorrelation.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 30 / 44
CumbyHuizinga test vs. ArellanoBond test Application in a panel context

Untuk membandingkan dengan actest, kami menambahkan opsi cluster () untuk menunjukkan
bahwa pengujian harus dihitung dalam konteks cluster-robust:
. actest, lags(3) clu(id)
Cumby-Huizinga test for autocorrelation

H0: disturbance is MA process up to order q


HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=specified lag-1
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1 - 1 35.014 1 0.0000 1 35.014 1 0.0000


1 - 2 56.630 2 0.0000 2 33.127 1 0.0000
1 - 3 58.136 3 0.0000 3 31.630 1 0.0000

Test allows predetermined regressors/instruments


Test robust to heteroskedasticity and within-cluster autocorrelation

The abar statistics are equal to those in the right-hand panel above.

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 31 / 44
CumbyHuizinga test vs. ArellanoBond test Application to IV-GMM with cluster-robust VCE

Tes juga setara dalam pengaturan panel ini saat kami memperkirakan model sesuai dengan
perbedaan pertama melalui variabel instrumental (IV-GMM) atau LIML dengan VCE cluster-robust.
Kami menggambarkan IV-GMM

. qui ivreg2 D.n (D.w D.k = D(1/2).(w k)), noco gmm2s clu(id)
. abar, lags(3)

Arellano-Bond test for AR(1): z = 3.97 Pr > z = 0.0001


Arellano-Bond test for AR(2): z = 1.81 Pr > z = 0.0705
Arellano-Bond test for AR(3): z = 0.42 Pr > z = 0.6739
. forv i=1/3 {
2. loc ar`i = r(ar`i)^2
3. loc dia "`dia `ar`i"
4. }
. di "`dia"
15.74212072538034 3.271292893080344 .1771184678625001

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 32 / 44
CumbyHuizinga test vs. ArellanoBond test Application to IV-GMM with cluster-robust VCE

The same test statistics and p-values for each lag order are produced
by actest:
. actest, lags(3) clu(id)
Cumby-Huizinga test for autocorrelation
H0: disturbance is MA process up to order q
HA: serial correlation present at specified lags >q
H0: q=0 (serially uncorrelated) H0: q=specified lag-1
HA: s.c. present at range specified HA: s.c. present at lag specified

lags chi2 df p-val lag chi2 df p-val

1 - 1 15.742 1 0.0001 1 15.742 1 0.0001


1 - 2 16.547 2 0.0003 2 3.271 1 0.0705
1 - 3 16.661 3 0.0008 3 0.177 1 0.6739

Test allows predetermined regressors/instruments


Test robust to heteroskedasticity and within-cluster autocorrelation

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 33 / 44
CumbyHuizinga test vs. ArellanoBond test Application to IV-GMM with cluster-robust VCE

Dalam konteks panel, kita mempertimbangkan apakah actest juga harus


menerima residu yang dihasilkan oleh areg, karena dalam kerangka itu efek
tetap partialled dapat diperlakukan seperti yang telah ditentukan, sehingga
penerapan uji C-H sangat mudah dilakukan

Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 34 / 44

Anda mungkin juga menyukai