Skip to main content

Panel Data Econometrics with R

Panel Data Econometrics with R

Yves Croissant, Givanni Millo

ISBN: 978-1-119-50464-1

Sep 2018

320 pages

Select type: O-Book

Description

Panel Data Econometrics with R provides a tutorial for using R in the field of panel data econometrics. Illustrated throughout with examples in econometrics, political science, agriculture and epidemiology, this book presents classic methodology and applications as well as more advanced topics and recent developments in this field including error component models, spatial panels and dynamic models. They have developed the software programming in R and host replicable material on the book’s accompanying website.

1 Introduction 5

1.1 Panel data econometrics: a gentle introduction 5

1.1.1 Eliminating unobserved components 6

1.2 R for econometric computing 11

1.2.1 The modus operandi of R 12

1.2.2 Data management 13

1.3 plm for the casual R user 14

1.3.1 R for the matrix language user 14

1.3.2 R for the user of econometric packages 16

1.4 plm for the procient R user 18

1.4.1 Reproducibile econometric work 18

1.4.2 Object-orientation for the user 19

1.5 plm for the R developer 20

1.5.1 Object orientation for development 21

1.6 Notations 24

2 The error component model 31

2.1 Notations and hypotheses 31

2.1.1 Notations 31

2.1.2 Some useful transformations 32

2.1.3 Hypotheses concerning the errors 34

2.2 Ordinary least squares estimators 36

2.2.1 Ordinary least squares on the raw data: the pooling model 36

2.2.2 The between estimator 38

2.2.3 The within estimator 39

2.3 The generalized least squares estimator 44

2.3.1 Presentation of the gls estimator 44

2.3.2 Estimation of the variances of the components of the error 46

2.4 Comparison of the estimators 51

2.4.1 Relations between the estimators 51

2.4.2 Comparison of the variances 52

2.4.3 Fixed vs random eects 53

2.4.4 Some simple linear model examples 55

2.5 The two-ways error components model 60

2.5.1 Error components in the two-ways model 60

2.5.2 Fixed and random eects models 61

2.6 Estimation of a wage equation 62

3 Advanced error components models 67

3.1 Unbalanced panels 67

3.1.1 Individual eects model 67

3.1.2 Two-ways error component model 69

3.1.3 Estimation of the components of the error variance 73

3.2 Seemingly unrelated regression equations 80

3.2.1 Introduction 80

3.2.2 Constrained least squares 81

3.2.3 Inter-equations correlation 82

3.2.4 SUR with panel data 83

3.3 The maximum likelihood estimator 88

3.3.1 Derivation of the likelihood function 89

3.3.2 Computation of the estimator 90

3.4 The nested error components model 92

3.4.1 Presentation of the model 92

3.4.2 Estimation of the variance of the error components 93

4 Tests on error component models 101

4.1 Tests on individual and/of time eects 102

4.1.1 F tests 102

4.1.2 Breusch-Pagan tests 102

4.2 Tests for correlated eects 107

4.2.1 The Mundlak approach 108

4.2.2 Hausman's test 109

4.2.3 Chamberlain's approach 110

4.3 Tests for serial correlation 115

4.3.1 Unobserved eects test 116

4.3.2 Score test of serial correlation and/or individual eects 117

4.3.3 Likelihood Ratio tests for ar(1) and individual eects 120

4.3.4 Applying traditional serial correlation tests to panel data 122

4.3.5 Wald tests for serial correlation 124

4.4 Tests for cross-sectional dependence 126

4.4.1 Pairwise correlation coe‑cients 126

4.4.2 cd -type tests for cross-sectional dependence 127

4.4.3 Testing cross-sectional dependence in a pseries 129

5 Robust inference and estimation 133

5.1 Robust inference 133

5.1.1 Robust covariance estimators 134

5.1.2 plm and generic sandwich estimators 145

5.1.3 Robust testing of linear hypotheses 150

5.2 Unrestricted generalized least squares 154

5.2.1 General feasible generalized least squares 155

5.2.2 Applied examples 160

6 Endogeneity 167

6.1 Introduction 167

6.2 The instrumental variables estimator 168

6.2.1 Generalities about the instrumental variables estimator 168

6.2.2 The within instrumental variables estimator 170

6.3 Error components instrumental variables estimator 173

6.3.1 The general model 173

6.3.2 Special cases of the general model 176

6.4 Estimation of a system of equations 186

6.4.1 The three stage least squares estimator 186

6.4.2 The error components three stage least squares estimator 188

6.5 More empirical examples 191

7 Estimation of a dynamic model 193

7.1 Dynamic model and endogeneity 195

7.1.1 The bias of the ols estimator 195

7.1.2 The within estimator 197

7.1.3 Consistent estimation methods for dynamic models 198

7.2 gmm estimation of the dierenced model 201

7.2.1 Instrumental variables and generalized method of moments 201

7.2.2 One-step estimator 203

7.2.3 Two-steps estimator 205

7.2.4 The proliferation of instruments 206

7.3 System GMM estimator 208

7.3.1 Weak instruments 208

7.3.2 Moment conditions on the levels model 209

7.3.3 The system gmm estimator 211

7.4 Inference 213

7.4.1 Robust estimation of the coe‑cients' covariance 213

7.4.2 Overidentification tests 215

7.4.3 Error serial correlation test 217

7.5 More empirical examples 219

8 Count data and limited dependent variables 223

8.1 Binomial and ordinal models 226

8.1.1 Introduction 226

8.1.2 The random eects model 228

8.1.3 The conditional logit model 234

8.2 Censored or truncated dependent variable 237

8.2.1 Introduction 237

8.2.2 The ordinary least squares estimator 238

8.2.3 The symmetrical trimmed estimator 240

8.2.4 The maximum likelihood estimator 242

8.2.5 Fixed eects model 243

8.2.6 The random eects model 250

8.3 Count data 253

8.3.1 Introduction 253

8.3.2 Fixed eects model 255

8.3.3 Random eects models 257

8.4 More empirical examples 261

9 Panel time series 265

9.1 Introduction 265

9.2 Heterogeneous coe‑cients 266

9.2.1 Fixed coe‑cients 267

9.2.2 Random coe‑cients 267

9.2.3 Testing for poolability 273

9.3 Cross-sectional dependence and common factors 276

9.3.1 The common factor model 277

9.3.2 Common Correlated Eects augmentation 278

9.4 Nonstationarity and cointegration 283

9.4.1 Unit root testing: generalities 284

9.4.2 First generation unit root testing 288

9.4.3 Second generation unit root testing 291

10 Spatial panels 295

10.1 Spatial correlation 295

10.1.1 Visual assessment 295

10.1.2 Testing for spatial dependence 296

10.2 Spatial lags 301

10.2.1 Spatially lagged regressors 302

10.2.2 Spatially lagged dependent variables 304

10.2.3 Spatially correlated errors 307

10.3 Individual heterogeneity in spatial panels 310

10.4 Serial and spatial correlation 332

10.4.1 Maximum likelihood estimation 333

10.4.2 Testing 337