pdwtest {plm} | R Documentation |
Test of serial correlation for (the idiosyncratic component of) the errors in panel models.
pdwtest(x, ...) ## S3 method for class 'panelmodel' pdwtest(x, ...) ## S3 method for class 'formula' pdwtest(x, data, ...)
x |
an object of class |
... |
further arguments to be passed on to |
data |
a |
This Durbin–Watson test uses the auxiliary model on
(quasi-)demeaned data taken from a model of class plm
which may
be a pooling
(the default), random
or within
model. It
performs a Durbin–Watson test (using dwtest
from package
lmtest on the residuals of the (quasi-)demeaned model,
which should be serially uncorrelated under the null of no serial
correlation in idiosyncratic errors. The function takes the
demeaned data, estimates the model and calls dwtest
. Thus, this
test does not take the panel structure of the residuals into
consideration; it shall not be confused with the generalized
Durbin-Watson test for panels in pbnftest
.
An object of class "htest"
.
Giovanni Millo
Durbin J, Watson GS (1950). “Testing for Serial Correlation in Least Squares Regression: I.” Biometrika, 37(3/4), 409–428. ISSN 00063444.
Durbin J, Watson GS (1951). “Testing for serial correlation in least sqares regression. II.” Biometrika, 38(1-2), 159-178. ISSN 0006-3444, doi: 10.1093/biomet/38.1-2.159, http://oup.prod.sis.lan/biomet/article-pdf/38/1-2/159/678895/38-1-2-159.pdf, https://doi.org/10.1093/biomet/38.1-2.159.
Durbin J, Watson GS (1971). “Testing for Serial Correlation in Least Squares Regression. III.” Biometrika, 58(1), 1–19. ISSN 00063444.
Wooldridge J (2002). Econometric Analysis of Cross–Section and Panel Data. MIT press.
Wooldridge J (2010). Econometric Analysis of Cross–Section and Panel Data. MIT press.
lmtest::dwtest()
for the Durbin–Watson test
in lmtest, pbgtest()
for the analogous
Breusch–Godfrey test for panel models,
lmtest::bgtest()
for the Breusch–Godfrey test for
serial correlation in the linear model. pbltest()
,
pbsytest()
, pwartest()
and
pwfdtest()
for other serial correlation tests for
panel models.
For the Durbin-Watson test generalized to panel data models see
pbnftest()
.
data("Grunfeld", package = "plm") g <- plm(inv ~ value + capital, data = Grunfeld, model="random") pdwtest(g) pdwtest(g, alternative="two.sided") ## formula interface pdwtest(inv ~ value + capital, data=Grunfeld, model="random")