pbsytest {plm} | R Documentation |
Test for residual serial correlation (or individual random effects) locally robust vs. individual random effects (serial correlation) for panel models and joint test by Baltagi and Li.
pbsytest(x,...) ## S3 method for class 'panelmodel' pbsytest(x, test = c("ar","re","j"), ...) ## S3 method for class 'formula' pbsytest(x, data, ..., test = c("ar","re","j"))
x |
an object of class |
data |
a |
test |
a character string indicating which test to perform:
first-order serial correlation ( |
... |
further arguments. |
These Lagrange multiplier tests are robust vs. local misspecification of the alternative hypothesis, i.e. they test the null of serially uncorrelated residuals against AR(1) residuals in a pooling model, allowing for local departures from the assumption of no random effects; or they test the null of no random effects allowing for local departures from the assumption of no serial correlation in residuals. They use only the residuals of the pooled OLS model and correct for local misspecification as outlined in Bera et al. (2001).
The joint test is due to Baltagi and Li (1991) and is added for convenience under this same interface.
An object of class "htest"
.
Giovanni Millo
Bera, A.K., Sosa-Escudero, W. and Yoon, M. (2001), Tests for the error component model in the presence of local misspecification, Journal of Econometrics, 101, pp. 1-23.
Baltagi, B. and Li, Q. (1991), A joint test for serial correlation and random individual effects, Statistics and Probability Letters, 11, pp. 277-280.
plmtest
for individual and/or time random effects tests based on a correctly specified model; pbltest
,
pbgtest
and pdwtest
for serial correlation tests in random effects models.
## Example in Bera et al. data(Grunfeld, package = "plm") ## Bera et al. use a subset of the original Grunfeld data, ## so results are slightly different here ## default is AR testing pbsytest(inv ~ value + capital, data = Grunfeld, index = c("firm","year")) pbsytest(inv ~ value + capital, data = Grunfeld, test="re", index = c("firm","year")) pbsytest(inv ~ value + capital, data = Grunfeld, test="j", index = c("firm","year"))