The plm Package - Linear Models and Tests for Panel Data

CRAN status Downloads


plm is a package for panel data econometrics for the R statistical computing environment. The package includes functions for model estimation, testing, robust covariance matrix estimation, panel data manipulation and information. It was first published on CRAN in 2006.

Be sure to read the NEWS on CRAN for any changes in new releases (new features, bugfixes, other improvements, …).

Non-exhaustive function overview:


To install the released version from CRAN:


The package’s CRAN website is

The development of package plm takes place on GitHub at To install the development version from GitHub, use, e.g.:

# install.packages("remotes") # remove '#' if pkg 'remotes' is not installed


Package plm comes with documentation: Besides the usual help pages for each function, the vignettes provide a gentle introduction to the package and some functions. Vignettes are available at the package’s CRAN website and can be browsed from within R by browseVignettes("plm").

New package users are advised to start with the first vignette Panel data econometrics in R: the plm package for an overview of the package. A more in-depth treatment of estimation of error component models and instrument variable models is in the second vignette Estimation of error component models with the plm function.

Further, many textbooks treat package plm and/or use it in their examples: