Description Usage Arguments Details Value Note Author(s) References See Also Examples
Test of serial correlation for (the idiosyncratic component of) the errors in panel models.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 
x 
an object of class 
... 
further arguments (see 
order 
an integer indicating the order of serial correlation
to be tested for. 
type 
type of test statistic to be calculated; either

data 
only relevant for formula interface: data set for which
the respective panel model (see 
model 
only relevant for formula interface: compute test
statistic for model 
This Lagrange multiplier test uses the auxiliary model on
(quasi)demeaned data taken from a model of class plm
which may
be a pooling
(default for formula interface), random
or
within
model. It performs a Breusch–Godfrey test (using bgtest
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, as
illustrated in \insertCiteWOOL:10;textualplm. The function
takes the demeaned data, estimates the model and calls bgtest
.
Unlike most other tests for serial correlation in panels, this one allows to choose the order of correlation to test for.
An object of class "htest"
.
The argument order
defaults to the minimum number of
observations over the time dimension, while for
lmtest::bgtest
it defaults to 1
.
Giovanni Millo
BREU:78plm
\insertRefGODF:78plm
\insertRefWOOL:02plm
\insertRefWOOL:10plm
\insertRefWOOL:13plm Sec. 12.2, pp. 421–422.
For the original test in package lmtest see
lmtest::bgtest()
. See pdwtest()
for the analogous
panel Durbin–Watson test. See pbltest()
, pbsytest()
,
pwartest()
and pwfdtest()
for other serial correlation
tests for panel models.
1 2 3 4 5 6 7 8 9 10 11 12 13  data("Grunfeld", package = "plm")
g < plm(inv ~ value + capital, data = Grunfeld, model = "random")
# panelmodel interface
pbgtest(g)
pbgtest(g, order = 4)
# formula interface
pbgtest(inv ~ value + capital, data = Grunfeld, model = "random")
# F test statistic (instead of default type="Chisq")
pbgtest(g, type="F")
pbgtest(inv ~ value + capital, data = Grunfeld, model = "random", type = "F")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.