Test of individual and/or time effects for panel models.
an object of class "plm" or a formula of class
"formula",
further arguments passed to plmtest.
a character string indicating which effects are
tested: individual effects ("individual"), time effects
("time") or both ("twoways"),
a character string indicating the test to be performed:
"honda" (default) for Honda (1985)
,
"bp" for Breusch and Pagan (1980)
,
"kw" for King and Wu (1997)
, or
"ghm" for Gourieroux et al. (1982)
for
unbalanced panel data sets, the respective unbalanced version
of the tests are computed,
a data.frame,
An object of class "htest".
These Lagrange multiplier tests use only the residuals of the
pooling model. The first argument of this function may be either a
pooling model of class plm or an object of class formula
describing the model. For input within (fixed effects) or random
effects models, the corresponding pooling model is calculated
internally first as the tests are based on the residuals of the
pooling model.
The "bp" test for unbalanced panels was derived in
Baltagi and Li (1990)
(1990), the "kw" test for unbalanced panels in
Baltagi et al. (1998)
.
The "ghm" test and the "kw" test were extended to two-way
effects in Baltagi et al. (1992)
.
For a concise overview of all these statistics see Baltagi (2003) , Sec. 4.2, pp. 68–76 (for balanced panels) and Sec. 9.5, pp. 200–203 (for unbalanced panels).
For the King-Wu statistics ("kw"), the oneway statistics
("individual" and "time") coincide with the respective
Honda statistics ("honda"); twoway statistics of "kw" and
"honda" differ.
Baltagi BH (2013). Econometric Analysis of Panel Data, 5th edition. John Wiley and Sons ltd.
Baltagi BH, Li Q (1990). “A Lagrange multiplier test for the error components model with incomplete panels.” Econometric Reviews, 9, 103–107.
Baltagi BH, Chang YJ, Li Q (1992). “Monte Carlo results on several new and existing tests for the error components model.” Journal of Econometrics, 54, 95–120.
Baltagi B, Chang YA, Li Q (1998). “Testing for random individual and time effects using unbalanced panel data.” Advances in econometrics, 13, 1-20.
Breusch TS, Pagan AR (1980). “The Lagrange Multiplier Test and Its Applications to Model Specification in Econometrics.” Review of Economic Studies, 47, 239–253.
Gourieroux C, Holly A, Monfort A (1982). “Likelihood Ratio Test, Wald Test, and Kuhn–Tucker Test in Linear Models With Inequality Constraints on the Regression Parameters.” Econometrica, 50, 63–80.
Honda Y (1985). “Testing the Error Components Model With Non–Normal Disturbances.” Review of Economic Studies, 52, 681–690.
King ML, Wu PX (1997). “Locally Optimal One–Sided Tests for Multiparameter Hypothese.” Econometric Reviews, 33, 523–529.
pFtest() for individual and/or time effects tests based
on the within model.
data("Grunfeld", package = "plm")
g <- plm(inv ~ value + capital, data = Grunfeld, model = "pooling")
plmtest(g)
#>
#> Lagrange Multiplier Test - (Honda)
#>
#> data: inv ~ value + capital
#> normal = 28.252, p-value < 2.2e-16
#> alternative hypothesis: significant effects
#>
plmtest(g, effect="time")
#>
#> Lagrange Multiplier Test - time effects (Honda)
#>
#> data: inv ~ value + capital
#> normal = -2.5404, p-value = 0.9945
#> alternative hypothesis: significant effects
#>
plmtest(inv ~ value + capital, data = Grunfeld, type = "honda")
#>
#> Lagrange Multiplier Test - (Honda)
#>
#> data: inv ~ value + capital
#> normal = 28.252, p-value < 2.2e-16
#> alternative hypothesis: significant effects
#>
plmtest(inv ~ value + capital, data = Grunfeld, type = "bp")
#>
#> Lagrange Multiplier Test - (Breusch-Pagan)
#>
#> data: inv ~ value + capital
#> chisq = 798.16, df = 1, p-value < 2.2e-16
#> alternative hypothesis: significant effects
#>
plmtest(inv ~ value + capital, data = Grunfeld, type = "bp", effect = "twoways")
#>
#> Lagrange Multiplier Test - two-ways effects (Breusch-Pagan)
#>
#> data: inv ~ value + capital
#> chisq = 804.62, df = 2, p-value < 2.2e-16
#> alternative hypothesis: significant effects
#>
plmtest(inv ~ value + capital, data = Grunfeld, type = "ghm", effect = "twoways")
#>
#> Lagrange Multiplier Test - two-ways effects (Gourieroux, Holly and
#> Monfort)
#>
#> data: inv ~ value + capital
#> chibarsq = 798.16, df0 = 0.00, df1 = 1.00, df2 = 2.00, w0 = 0.25, w1 =
#> 0.50, w2 = 0.25, p-value < 2.2e-16
#> alternative hypothesis: significant effects
#>
plmtest(inv ~ value + capital, data = Grunfeld, type = "kw", effect = "twoways")
#>
#> Lagrange Multiplier Test - two-ways effects (King and Wu)
#>
#> data: inv ~ value + capital
#> normal = 21.832, p-value < 2.2e-16
#> alternative hypothesis: significant effects
#>
Grunfeld_unbal <- Grunfeld[1:(nrow(Grunfeld)-1), ] # create an unbalanced panel data set
g_unbal <- plm(inv ~ value + capital, data = Grunfeld_unbal, model = "pooling")
plmtest(g_unbal) # unbalanced version of test is indicated in output
#>
#> Lagrange Multiplier Test - (Honda)
#>
#> data: inv ~ value + capital
#> normal = 28.225, p-value < 2.2e-16
#> alternative hypothesis: significant effects
#>