Learn R Programming

plm (version 1.6-5)

pFtest: F Test for Individual and/or Time Effects

Description

Test of individual and/or time effects based on the comparison of the within and the pooling model.

Usage

pFtest(x, ...) "pFtest"(x, z, ...) "pFtest"(x, data, ...)

Arguments

x
an object of class "plm" or of class "formula",
z
an object of class "plm",
data
a data.frame,
...
further arguments.

Value

An object of class "htest".

Details

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.

See Also

plmtest for Lagrange multipliers tests of individuals and/or time effects.

Examples

Run this code
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)
pFtest(gt, gp)
pFtest(gd, gp)
pFtest(inv ~ value + capital, data = Grunfeld, effect = "twoways")

Run the code above in your browser using DataLab