
Last chance! 50% off unlimited learning
Sale ends in
Test of serial correlation for (the idiosyncratic component of) the errors in panel models.
pdwtest(x, ...)# S3 method for panelmodel
pdwtest(x, ...)
# S3 method for formula
pdwtest(x, data, ...)
an object of class "panelmodel"
or of class
"formula"
,
further arguments to be passed on to dwtest
,
e.g. alternative
, see lmtest::dwtest()
for
further details.
a data.frame
,
An object of class "htest"
.
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
.
DURB:WATS:50plm
DURB:WATS:51plm
DURB:WATS:71plm
WOOL:02plm
WOOL:10plm
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()
.
# NOT RUN {
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")
# }
Run the code above in your browser using DataLab