11.11 Packages & Functions: plm
AERandplmpackageplm(): Estimate linear models for panel data usinglm()on transformed dataindex =: Specify the index variables (unit’s id and e.g. time)model =: one of"pooling","within","between","random","fd", or"ht""pooling"= pooled OLS"within"= fixed effects"fd"= first-differences"random"= random effects (?)"between"= between (?)
- See Croissant and Millo (2008) for an overview of the package.
- Important, sometimes there are conflicts between packages (e.g.,
plmanddplyr)- e.g., between
dplyr::lagandstats::lag - It might be necessary to specify which functions
plmshould rely on by using theconflictedpackageslibrary(conflicted), conflict_prefer("filter", "stats"), conflict_prefer("lag", "stats")
- e.g., between
References
Croissant, Yves, and Giovanni Millo. 2008. “Panel Data Econometrics in R: The Plm Package.” Journal of Statistical Software, Articles 27 (2): 1–43.