Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pggls

General FGLS Estimators


Description

General FGLS estimators for panel data (balanced or unbalanced)

Usage

pggls(
  formula,
  data,
  subset,
  na.action,
  effect = c("individual", "time"),
  model = c("within", "random", "pooling", "fd"),
  index = NULL,
  ...
)

## S3 method for class 'pggls'
summary(object, ...)

## S3 method for class 'summary.pggls'
print(
  x,
  digits = max(3, getOption("digits") - 2),
  width = getOption("width"),
  ...
)

## S3 method for class 'pggls'
residuals(object, ...)

Arguments

formula

a symbolic description of the model to be estimated,

data

a data.frame,

subset

see lm(),

na.action

see lm(),

effect

the effects introduced in the model, one of "individual" or "time",

model

one of "within", "pooling", "random" or "fd",

index

the indexes, see pdata.frame(),

...

further arguments.

object, x

an object of class pggls,

digits

digits,

width

the maximum length of the lines in the print output,

Details

pggls is a function for the estimation of linear panel models by general feasible generalized least squares, either with or without fixed effects. General FGLS is based on a two-step estimation process: first a model is estimated by OLS (model = "pooling"), fixed effects (model = "within") or first differences (model = "fd"), then its residuals are used to estimate an error covariance matrix for use in a feasible-GLS analysis. This framework allows the error covariance structure inside every group (if effect = "individual", else symmetric) of observations to be fully unrestricted and is therefore robust against any type of intragroup heteroskedasticity and serial correlation. Conversely, this structure is assumed identical across groups and thus general FGLS estimation is inefficient under groupwise heteroskedasticity. Note also that this method requires estimation of T(T+1)/2 variance parameters, thus efficiency requires N >> T (if effect = "individual", else the opposite). Setting model = "random" or model = "pooling", both produce an unrestricted FGLS model as in Wooldridge, Ch. 10.5, although the former is deprecated and included only for retro–compatibility reasons. If model = "within" (the default) then a FEGLS (fixed effects GLS, see ibid.) is estimated; if model = "fd" a FDGLS (first-difference GLS).

Value

An object of class c("pggls","panelmodel") containing:

coefficients

the vector of coefficients,

residuals

the vector of residuals,

fitted.values

the vector of fitted values,

vcov

the covariance matrix of the coefficients,

df.residual

degrees of freedom of the residuals,

model

a data.frame containing the variables used for the estimation,

call

the call,

sigma

the estimated intragroup (or cross-sectional, if effect = "time") covariance of errors,

Author(s)

Giovanni Millo

References

Im KS, Ahn SC, Schmidt P, Wooldridge JM (1999). “Efficient estimation of panel data models with strictly exogenous explanatory variables.” Journal of Econometrics, 93(1), 177–201. ISSN 0304-4076, https://www.sciencedirect.com/science/article/pii/S0304407699000081.

Kiefer NM (1980). “Estimation of fixed effect models for time series of cross-sections with arbitrary intertemporal covariance.” Journal of Econometrics, 14(2), 195–202.

Wooldridge JM (2002). Econometric Analysis of Cross–Section and Panel Data. MIT press.

Wooldridge JM (2010). Econometric Analysis of Cross–Section and Panel Data. MIT press.

Examples

data("Produc", package = "plm")
zz_wi <- pggls(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
               data = Produc, model = "within")
summary(zz_wi)

zz_pool <- pggls(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
                 data = Produc, model = "pooling")
summary(zz_pool)

zz_fd <- pggls(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
               data = Produc, model = "fd")
summary(zz_fd)

plm

Linear Models for Panel Data

v2.4-1
GPL (>= 2)
Authors
Yves Croissant [aut, cre], Giovanni Millo [aut], Kevin Tappe [aut], Ott Toomet [ctb], Christian Kleiber [ctb], Achim Zeileis [ctb], Arne Henningsen [ctb], Liviu Andronic [ctb], Nina Schoenfelder [ctb]
Initial release
2021-03-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.