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

plm-package

plm package: linear models for panel data


Description

plm is a package for R which intends to make the estimation of linear panel models straightforward. plm provides functions to estimate a wide variety of models and to make (robust) inference.

Details

For a gentle and comprehensive introduction to the package, please see the package's vignette.

The main functions to estimate models are:

  • plm: panel data estimators using lm on transformed data,

  • pvcm: variable coefficients models

  • pgmm: generalized method of moments (GMM) estimation for panel data,

  • pggls: estimation of general feasible generalized least squares models,

  • pmg: mean groups (MG), demeaned MG and common correlated effects (CCEMG) estimators,

  • pcce: estimators for common correlated effects mean groups (CCEMG) and pooled (CCEP) for panel data with common factors,

  • pldv: panel estimators for limited dependent variables.

Next to the model estimation functions, the package offers several functions for statistical tests related to panel data/models.

Multiple functions for (robust) variance–covariance matrices are at hand as well.

The package also provides data sets to demonstrate functions and to replicate some text book/paper results. Use data(package="plm") to view a list of available data sets in the package.

Examples

data("Produc", package = "plm")
zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
          data = Produc, index = c("state","year"))
summary(zz)

# replicates some results from Baltagi (2013), table 3.1
data("Grunfeld", package = "plm")
p <- plm(inv ~ value + capital,
         data = Grunfeld, model="pooling")

wi <- plm(inv ~ value + capital,
          data = Grunfeld, model="within", effect = "twoways")

swar <- plm(inv ~ value + capital,
            data = Grunfeld, model="random", effect = "twoways")
          
amemiya <- plm(inv ~ value + capital,
               data = Grunfeld, model = "random", random.method = "amemiya",
               effect = "twoways")
                
walhus <- plm(inv ~ value + capital,
              data = Grunfeld, model = "random", random.method = "walhus",
              effect = "twoways")

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.