## Panel Data Econometrics in R: The plm Package (2008)

### Cached

### Download Links

Venue: | Journal of Statistical Software |

Citations: | 13 - 1 self |

### BibTeX

@ARTICLE{Croissant08paneldata,

author = {Yves Croissant and Université Lumière Lyon and Giovanni Millo},

title = {Panel Data Econometrics in R: The plm Package},

journal = {Journal of Statistical Software},

year = {2008}

}

### OpenURL

### Abstract

This introduction to the plm package is a slightly modified version of Croissant and Millo (2008), published in the Journal of Statistical Software. Panel data econometrics is obviously one of the main fields in the profession, but most of the models used are difficult to estimate with R. 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. Keywords:˜panel data, covariance matrix estimators, generalized method of moments, R. 1.

### Citations

1444 |
Some Tests of Specification for Panel Data: Monte Carlo Evidence and an Application to Employment Equations
- M, Bond
- 1991
(Show Context)
Citation Context ...um of Squares: 2194300 Multiple R-Squared: 0.99537 5.4. Generalized method of moments estimator The generalized method of moments is mainly used in panel data econometrics to estimate dynamic models (=-=Arellano and Bond 1991-=-; Holtz-Eakin, Newey, and Rosen 1988). yit = ρyit−1 + β ⊤ xit + µi + ɛit (10) The model is first differenced to get rid of the individual effect: ∆yit = ρ∆yit−1 + β ⊤ ∆xit + ∆ɛit (11) Least squares ar... |

1423 |
Econometric Analysis
- Greene
- 1993
(Show Context)
Citation Context ...downwards. In a pooled time series context (effect="time"), symmetrically, this estimator is able to account for arbitrary cross-sectional correlation, provided that the latter is time-invariant (see =-=Greene 2003-=-, 13.9.1–2, p.321–2). In this case serial correlation has to be assumed away and the estimator is consistent with respect to the time dimension, keeping n fixed. The function pggls estimates general f... |

1287 | A heteroskedasticity-consistent covariance matrix estimator and a direct test of heteroskedasticity - White - 1980 |

836 | Initial Conditions and Moment Restrictions in Dynamic Panel Data Models - Blundell, Bond - 1998 |

632 |
Econometric Analysis of Panel Data
- Baltagi
- 1995
(Show Context)
Citation Context ... implemented, ˆ the only estimator of the variance of the error components is the one proposed by Swamy and Arora (1972) The following example is using data used by (?) function. It is reproduced in (=-=Baltagi 2001-=-), p. 174. to estimate an hedonic housing prices R> data("Hedonic", package = "plm") R> Hed <- plm(mv ~ crim + zn + indus + chas + nox + rm + age + dis + + rad + tax + ptratio + blacks + lstat, Hedoni... |

502 |
Specification tests in econometrics
- Hausman
- 1978
(Show Context)
Citation Context ...ificant effects R> pFtest(inv ~ value + capital, data = Grunfeld, effect = "twoways") 6.3. Hausman test phtest computes the Hausman test which is based on the comparison of two sets of estimates (see =-=Hausman 1978-=-). Its main arguments are two panelmodel objects or a formula. A classical application of the Hausman test for panel data is to compare the fixed and the random effects models: R> gw <- plm(inv ~ valu... |

363 | Core Team (2008) R: a language and environment for statistical computing - Development |

316 | Random-effects models for longitudinal data - Laird, Ware - 1982 |

228 | Estimating vector autoregressions with panel data - Holtz-Eakin, Newey, et al. - 1988 |

213 |
lme4: linear mixed-effects models using s4 classes [Computer software manual]. Retrieved from http://CRAN.R-project.org/package=lme4 (R package version 0.999375-37
- Bates, Maechler
- 2010
(Show Context)
Citation Context ... framework for (among many other features) maximum likelihood estimation of linear regression models for longitudinal data, packages nlme (Pinheiro, Bates, DebRoy, and the˜R Core˜team 2007) and lme4 (=-=Bates 2007-=-), is available in the R (R Development Core Team 2008) environment and can be used, e.g., for estimation of random effects panel models, its use is not intuitive for a practicing econometrician, and ... |

212 |
Estimation of Dynamic Models with Error Components
- Anderson, Hsiao
- 1981
(Show Context)
Citation Context ...ifferenced to get rid of the individual effect: ∆yit = ρ∆yit−1 + β ⊤ ∆xit + ∆ɛit (11) Least squares are inconsistent because ∆ɛit is correlated with ∆yit−1. yit−2 is a valid, but weak instrument (see =-=Anderson and Hsiao 1981-=-). The gmm estimator uses the fact that the number of valid instruments is growing with t: ˆ t = 3: y1, ˆ t = 4: y1, y2, ˆ t = 5: y1, y2, y3 For individual i, the matrix of instruments is then:22 Pan... |

164 | A Finite Sample Correction For the Variance of Linear Two-Step GMM Estimators”, IFS-working paper - Windmeijer - 2000 |

160 | Asymptotic Theory for Econometricians - White - 1984 |

115 |
Econometric Analysis, 5 th Edition
- Greene
- 2003
(Show Context)
Citation Context ...downwards. In a pooled time series context (effect="time"), symmetrically, this estimator is able to account for arbitrary cross-sectional correlation, provided that the latter is time-invariant (see =-=Greene 2003-=-, 13.9.1–2, p.321–2). In this case serial correlation has to be assumed away and the estimator is consistent with respect to the time dimension, keeping n fixed. The function pggls estimates general f... |

97 |
Econometric Analysis of Cross-Section and Panel Data, The MIT Press, 1st Edition. 49
- Wooldridge
- 2001
(Show Context)
Citation Context ...e general24 Panel Data Econometrics in R: The plm Package than the random effects one for use in a feasible-gls analysis. Formally, the estimated error covariance matrix is ˆ V = In ⊗ ˆ Ω, with (see =-=Wooldridge 2002-=-, 10.4.3 and 10.5.5). ˆΩ = n∑ i=1 ûitû ⊤ it n This framework allows the error covariance structure inside every group (if effect="individual") of observations to be fully unrestricted and is therefore... |

90 |
Computing robust standard errors for within-groups estimators
- Arellano
- 1987
(Show Context)
Citation Context ...ommon variance inside every group, estimated as σ2 i = ∑T t=1 û2 it /T , so that Ωi = IT ⊗ σ2 i (see Greene (2003, 13.7.1–2) and Wooldridge (2002, 10.7.2); "arellano" (see ibid. and the original ref. =-=Arellano 1987-=-) allows a fully general structure w.r.t. heteroskedasticity and serial correlation: ⎡ σ Ωi = ⎢ ⎣ 2 i1 σi1,i2 . . . . . . σi1,iT σi2,i1 σ2 i2 . . . .. . . σ2 iT −1 σiT −1,iT σiT,i1 . . . . . . σiT,iT ... |

86 | General diagnostic tests for cross section dependence in panels. CESifo Working Paper 1229
- Pesaran
- 2004
(Show Context)
Citation Context ...on is “large”. A scaled version, applicable also if T → ∞ and then n → ∞ (as in some pooled time series contexts), is defined as √ 1 SCLM = n(n − 1) ( and distributed as a standard Normal. Pesaran’s (=-=Pesaran 2004-=-) CD test √ 2 CD = n(n − 1) ( n−1 ∑ n∑ i=1 j=i+1 n−1 ∑ n∑ i=1 j=i+1 √ Tij ˆρ 2 ij) √ Tij ˆρij) based on ρij without squaring (also distributed as a standard Normal) is appropriate both in n– and in T ... |

77 |
Statistical Inference in Random Coefficient Regression Models
- Swamy
- 1971
(Show Context)
Citation Context ...are assumed to be fixed if model="within" or random if model="random". In the first case, a different model is estimated for each individual (or time period). In the second case, the Swamy model (see =-=Swamy 1970-=-) model is estimated. It is a generalized least squares model which uses the results of the previous model. Denoting ˆ βi the vectors of coefficients obtained for each individual, we get: ˆβ = ( n∑ i=... |

61 |
On the Pooling of Time Series
- Mundlak
- 1978
(Show Context)
Citation Context ...nometrics is often recognized to be misleading, as both are treated as random variates in modern econometrics (see e.g. Wooldridge 2002, 10.2.1). It has been recognized since Mundlak’s classic paper (=-=Mundlak 1978-=-) that the fundamental issue is whether the unobserved effects are correlated with the regressors or not. In this last case, they can safely be left in the error term, and the serial correlation they ... |

51 |
An R and S-Plus companion to applied regression
- Fox
- 2002
(Show Context)
Citation Context ...concile the two terminologies, in the following we report the specification of the panel models in plm according to the general expression of a mixed model in Laird-Ware form (see the web appendix to =-=Fox 2002-=-) and the nlme estimation commands for maximum likelihood 23 For fixed effects estimation, as the sample grows (on the dimension on which the fixed effects are specified) so does the number of paramet... |

46 |
On the pooling of time series and cross section data,”Econometrica 46
- Mundlak
- 1978
(Show Context)
Citation Context ...nometrics is often recognized to be misleading, as both are treated as random variates in modern econometrics (see e.g. Wooldridge 2002, 10.2.1). It has been recognized since Mundlak’s classic paper (=-=Mundlak 1978-=-) that the fundamental issue is whether the unobserved effects are correlated with the regressors or not. In this last case, they can safely be left in the error term, and the serial correlation they ... |

45 | Further Evidence on the Estimation of Dynamic Economic Relations from a Time Series of Cross Sections - Nerlove - 1971 |

38 | Testing for Serial Correlation in Linear Panel-Data Models - Drukker |

29 |
Econometric Analysis of Panel Data (3rd ed
- Baltagi
- 2005
(Show Context)
Citation Context ... implemented, ˆ the only estimator of the variance of the error components is the one proposed by Swamy and Arora (1972) The following example is using data used by (?) function. It is reproduced in (=-=Baltagi 2001-=-), p. 174. to estimate an hedonic housing prices R> data("Hedonic", package = "plm") R> Hed <- plm(mv ~ crim + zn + indus + chas + nox + rm + age + dis + + rad + tax + ptratio + blacks + lstat, Hedoni... |

23 | Simultaneous equations with error components - Baltagi - 1981 |

23 |
Heteroskedasticity-robust standard errors for fixed effects panel data regression
- Stock, Watson
- 2008
(Show Context)
Citation Context ...g induces serial correlation in the errors. The original White estimator (white1) turns out to be inconsistent for fixed T as n grows, so in this case it is advisable to use the arellano version (see =-=Stock and Watson 2006-=-). The errors may be weighted according to the schemes proposed by MacKinnon and White (1985) and Cribari-Neto (2004) to improve small-sample performance 18 . The main use of vcovHC is together with t... |

20 | Serial correlation and the fixed effects model. The Review of Economic Studies - Bhargava, Franzini, et al. - 1982 |

17 |
spdep: Spatial dependence: weighting schemes, statistics and models [online]. Available from http://CRAN.R-projects.org/package=spdep
- Bivand, Altman, et al.
(Show Context)
Citation Context ...oups while allowing for heteroskedasticity across groups, so that the full covariance matrix of errors is V = In ⊗ Ωi; i = 16 The very comprehensive package spdep for spatial dependence analysis (see =-=Bivand 2008-=-) contains features for creating, lagging and manipulating neighbour list objects of class nb, that can be readily converted to and from proximity matrices by means of the nb2mat function. Higher orde... |

16 | The Estimation of the Variances in a Variance-Components Model - Amemiya - 1971 |

16 |
Testing AR(1) against MA(1) disturbances in an error component model
- Baltagi, Li
- 1995
(Show Context)
Citation Context ...r method="arellano") 12 . 11 Baltagi and Li derive a basically analogous T-asymptotic test for first-order serial correlation in a fe panel model as a Breusch-Godfrey LM test on within residuals (see =-=Baltagi and Li 1995-=-, par. 2.3 and formula 12). They also observe that the test on within residuals can be used for testing on the re model, as “the within transformation [time-demeaning, in our terminology] wipes out th... |

15 | car: Companion to Applied Regression. R package version 1.2-16, URL http: //CRAN.R-project.org/package=car - Fox - 2009 |

13 | Full Information Estimations of a System of Simultaneous Equations with Error Component Structure. Econometric Theory 3 - Balestra, Varadharajan-Krishnakumar - 1987 |

10 | Matrix: A Matrix Package for R. R package version 0.999375-2, URL http://CRAN.R-project.org/package=Matrix - Bates, Maechler - 2007 |

9 | Zeileis A (2008). Applied Econometrics with R - Kleiber |

8 | The Exact Finite Sample - SWAMY, ARORA - 1972 |

7 | Efficient Estimation with Panel Data: an Empirical Comparison of Instrumental Variable Estimators - Cornwell, Rupert - 1988 |

7 | SparseM: Sparse Linear Algebra. R package version 0.73, URL http://CRAN.R-project.org/package=SparseM - Koenker, Ng - 2007 |

6 | Asymptotic Inference Under Heteroskedasticity of Unknown Form - Cribari-Neto - 2004 |

6 | Locally optimal one-sided tests for multiparameter hypotheses - King, Wu - 1997 |

5 | 2008): "Tests for the Error Component Model in the Presence of Local Misspeci…cation - Bera, Montes-Rojas, et al. |

5 | Monfort A - Gouriéroux - 1991 |

5 | Testing the error components model with non-normal disturbances - Honda - 1985 |

4 | Why Has Productivity Growth Declined - Munnell - 1990 |

3 | Sarafidis (2006): “Testing for cross-sectional dependence in panel-data models - Hoyos, V |

1 | Therneau T (2007). kinship: Mixed–Effects Cox Models, Sparse Matrices, and Modeling Data from Large Pedigrees. R package version 1.1.0-18, URL http: //CRAN.R-project.org - Atkinson |

1 | A Joint Test for Serial Correlation - Baltagi, Li - 1991 |

1 | DebRoy S, the˜R Core˜team DS (2007). nlme: Linear and Nonlinear Mixed Effects Models. R package version 3.1-86, URL http://CRAN.R-project.org - Pinheiro, Bates |