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
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
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 4 / 44
Earlier tests for multiple orders of autocorrelation The BreuschGodfrey test
1 130.900 1 0.0000
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 5 / 44
Earlier tests for multiple orders of autocorrelation The BreuschGodfrey 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
4 132.364 4 0.0000
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
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
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
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
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 11 / 44
The CumbyHuizinga test in perspective Testing for independence in regression residuals
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 12 / 44
The CumbyHuizinga test in perspective Allowing for predetermined regressors
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 13 / 44
The CumbyHuizinga test in perspective Allowing for predetermined regressors
4 95.947 4 0.0000
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 14 / 44
The CumbyHuizinga test in perspective Allowing for predetermined regressors
4 15.506 4 0.0038
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
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
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
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
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
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
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
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 22 / 44
CumbyHuizinga test vs. ArellanoBond test The abar 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
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).
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 25 / 44
CumbyHuizinga test vs. ArellanoBond test Classical VCE
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 26 / 44
CumbyHuizinga test vs. ArellanoBond test Classical VCE
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.
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 28 / 44
CumbyHuizinga test vs. ArellanoBond test HAC VCE
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
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
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)
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
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
Baum & Schaffer (BC, HWU) Testing for autocorrelation UKSUG 19, Sep. 2013 34 / 44