Learn R Programming

plm (version 0.3-1)

fixef.plm: Extract the Fixed Effects

Description

This function extracts the fixed effects from a plm object.

Usage

## S3 method for class 'plm':
fixef(object, effect, ...)
## S3 method for class 'fixef':
print(x, digits = max(3, getOption("digits") - 2),
width = getOption("width"),...)
## S3 method for class 'fixef':
summary(object, ...)
## S3 method for class 'summary.fixef':
print(x, digits = max(3, getOption("digits") -
2), width = getOption("width"),...)

Arguments

x,object
an object of class "plm", an object of class "fixef" for the print and the summary method,
effect
one of "individual" or "time", only relevant in case of two--ways effects models,
digits
digits,
width
the maximum length of the lines in the print output,
...
further arguments.

Value

  • An object of class "fixef". It is a numeric vector containing the fixed effects with two attributes : se which contains the standard errors and intercept which is the overall intercept.

Details

The element fixef of a plm object corresponding to a within model is a numerical vector which length is the total number of observations. This function returns a vector which length is the number of individuals. The summary method prints the effects in deviation from the overall intercept, the standard error and the t--values.

See Also

plm

Examples

Run this code
data("Grunfeld",package="Ecdat")
gi <- plm(inv ~ value + capital, data = Grunfeld, model = "within")
fixef(gi)
summary(fixef(gi))
# extract time effects in a twoways effect model
gi <- plm(inv ~ value + capital, data = Grunfeld, model = "within",
    effect = "twoways")
fixef(gi,effect = "time")

Run the code above in your browser using DataLab