Learn R Programming

plm (version 0.3-1)

pFtest: F Test for Effects

Description

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

Usage

pFtest(x, ...)
## S3 method for class 'plm':
pFtest(x, z, ...)
## S3 method for class 'formula':
pFtest(x, data, effect = "individual", ...)

Arguments

x
an object of class "plm" or of class "formula",
z
an object of class "plm",
effect
the effects introduced in the model, one of "individual", "time" or "twoways",
data
a data.frame,
...
further arguments, especially the index argument if the formula method is used.

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 whether individual, time or twoways effects depending on the effects introduced in the model.

See Also

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

Examples

Run this code
data("Grunfeld", package="Ecdat")
gi <- plm(inv ~ value + capital, data=Grunfeld, model="pooling")
gt <- plm(inv ~ value + capital, data=Grunfeld, effect="time",model="within")
gd <- plm(inv ~ value + capital, data=Grunfeld, effect="twoways", model="within")
pFtest(gt,gi)
pFtest(gd,gi)
pFtest(inv~value+capital, data=Grunfeld, effect="twoways")

Run the code above in your browser using DataLab