Test of individual and/or time effects based on the comparison of the
within and the pooling model.
pFtest(x, ...)
# S3 method for class 'formula'
pFtest(x, data, ...)
# S3 method for class 'plm'
pFtest(x, z, ...)An object of class "htest".
For the plm method, the argument of this function is two plm
objects, the first being a within model, the second a pooling
model. The effects tested are either individual, time or twoways,
depending on the effects introduced in the within model.
plmtest() for Lagrange multiplier tests of individuals
and/or time effects.
data("Grunfeld", package="plm")
gp <- plm(inv ~ value + capital, data = Grunfeld, model = "pooling")
gi <- plm(inv ~ value + capital, data = Grunfeld,
effect = "individual", model = "within")
gt <- plm(inv ~ value + capital, data = Grunfeld,
effect = "time", model = "within")
gd <- plm(inv ~ value + capital, data = Grunfeld,
effect = "twoways", model = "within")
pFtest(gi, gp)
#>
#> F test for individual effects
#>
#> data: inv ~ value + capital
#> F = 49.177, df1 = 9, df2 = 188, p-value < 2.2e-16
#> alternative hypothesis: significant effects
#>
pFtest(gt, gp)
#>
#> F test for time effects
#>
#> data: inv ~ value + capital
#> F = 0.23451, df1 = 19, df2 = 178, p-value = 0.9997
#> alternative hypothesis: significant effects
#>
pFtest(gd, gp)
#>
#> F test for twoways effects
#>
#> data: inv ~ value + capital
#> F = 17.403, df1 = 28, df2 = 169, p-value < 2.2e-16
#> alternative hypothesis: significant effects
#>
pFtest(inv ~ value + capital, data = Grunfeld, effect = "twoways")
#>
#> F test for twoways effects
#>
#> data: inv ~ value + capital
#> F = 17.403, df1 = 28, df2 = 169, p-value < 2.2e-16
#> alternative hypothesis: significant effects
#>