Panel Data: Linear Models

Similar documents
Non-linear panel data modeling

Advanced Econometrics

Applied Microeconometrics (L5): Panel Data-Basics

Chapter 6. Panel Data. Joan Llull. Quantitative Statistical Methods II Barcelona GSE

Repeated observations on the same cross-section of individual units. Important advantages relative to pure cross-section data

Panel Data Models. Chapter 5. Financial Econometrics. Michael Hauser WS17/18 1 / 63

Dealing With Endogeneity

Econometrics. Week 8. Fall Institute of Economic Studies Faculty of Social Sciences Charles University in Prague

Econometrics of Panel Data

Linear dynamic panel data models

Econometrics of Panel Data

Econometrics. Week 6. Fall Institute of Economic Studies Faculty of Social Sciences Charles University in Prague

Econometrics of Panel Data

Econometrics of Panel Data

Fixed Effects Models for Panel Data. December 1, 2014

Econometric Analysis of Cross Section and Panel Data

Econometrics of Panel Data

Introductory Econometrics

Nonstationary Panels

Sensitivity of GLS estimators in random effects models

EC327: Advanced Econometrics, Spring 2007

Topic 10: Panel Data Analysis

Econometrics. Week 4. Fall Institute of Economic Studies Faculty of Social Sciences Charles University in Prague

Introduction to Panel Data Analysis

Panel Data Models. James L. Powell Department of Economics University of California, Berkeley

Applied Economics. Panel Data. Department of Economics Universidad Carlos III de Madrid

Lecture: Simultaneous Equation Model (Wooldridge s Book Chapter 16)

Intermediate Econometrics

Panel Data Model (January 9, 2018)

Economics 582 Random Effects Estimation

Wooldridge, Introductory Econometrics, 4th ed. Chapter 15: Instrumental variables and two stage least squares

10 Panel Data. Andrius Buteikis,

Panel data methods for policy analysis

1 Estimation of Persistent Dynamic Panel Data. Motivation

Linear Regression with Time Series Data

Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data

Applied Quantitative Methods II

ECON 4551 Econometrics II Memorial University of Newfoundland. Panel Data Models. Adapted from Vera Tabakova s notes

Econ 582 Fixed Effects Estimation of Panel Data

Specification Tests in Unbalanced Panels with Endogeneity.

Applied Econometrics (MSc.) Lecture 3 Instrumental Variables

Economics 308: Econometrics Professor Moody

G. S. Maddala Kajal Lahiri. WILEY A John Wiley and Sons, Ltd., Publication

Specification testing in panel data models estimated by fixed effects with instrumental variables

Please discuss each of the 3 problems on a separate sheet of paper, not just on a separate page!

Heteroskedasticity. We now consider the implications of relaxing the assumption that the conditional

Lecture 9: Panel Data Model (Chapter 14, Wooldridge Textbook)

A Course in Applied Econometrics Lecture 4: Linear Panel Data Models, II. Jeff Wooldridge IRP Lectures, UW Madison, August 2008

Review of Classical Least Squares. James L. Powell Department of Economics University of California, Berkeley

Heteroskedasticity and Autocorrelation

Econometrics I Lecture 3: The Simple Linear Regression Model

Simultaneous Equations with Error Components. Mike Bronner Marko Ledic Anja Breitwieser

Økonomisk Kandidateksamen 2004 (I) Econometrics 2. Rettevejledning

Panel Data: Fixed and Random Effects

Econometrics Summary Algebraic and Statistical Preliminaries

Dynamic Panel Data Workshop. Yongcheol Shin, University of York University of Melbourne

Short T Panels - Review

Linear Panel Data Models

Multiple Equation GMM with Common Coefficients: Panel Data

Week 2: Pooling Cross Section across Time (Wooldridge Chapter 13)

Limited Dependent Variables and Panel Data

Diagnostics of Linear Regression

Warwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation

Instrumental Variables, Simultaneous and Systems of Equations

Notes on Panel Data and Fixed Effects models

Ordinary Least Squares Regression

the error term could vary over the observations, in ways that are related

Increasing the Power of Specification Tests. November 18, 2018

Lecture Notes on Measurement Error

1. Overview of the Basic Model

When Should We Use Linear Fixed Effects Regression Models for Causal Inference with Longitudinal Data?

EMERGING MARKETS - Lecture 2: Methodology refresher

Panel Data Seminar. Discrete Response Models. Crest-Insee. 11 April 2008

1 Outline. 1. Motivation. 2. SUR model. 3. Simultaneous equations. 4. Estimation

Econometrics II - EXAM Answer each question in separate sheets in three hours

Econometrics I KS. Module 2: Multivariate Linear Regression. Alexander Ahammer. This version: April 16, 2018

y it = α i + β 0 ix it + ε it (0.1) The panel data estimators for the linear model are all standard, either the application of OLS or GLS.

Econometrics Master in Business and Quantitative Methods

Final Exam. Economics 835: Econometrics. Fall 2010

Testing Random Effects in Two-Way Spatial Panel Data Models

Truncation and Censoring

Panel Data Exercises Manuel Arellano. Using panel data, a researcher considers the estimation of the following system:

Introduction to Eco n o m et rics

INTRODUCTION TO BASIC LINEAR REGRESSION MODEL

Chapter 2. Dynamic panel data models

CRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M.

Estimating Panel Data Models in the Presence of Endogeneity and Selection

Heteroskedasticity. Part VII. Heteroskedasticity

IV Estimation and its Limitations: Weak Instruments and Weakly Endogeneous Regressors

What s New in Econometrics? Lecture 14 Quantile Methods

Economics 536 Lecture 7. Introduction to Specification Testing in Dynamic Econometric Models

Exogeneity tests and weak identification

Review of Econometrics

Missing dependent variables in panel data models

Quick Review on Linear Multiple Regression

When Should We Use Linear Fixed Effects Regression Models for Causal Inference with Panel Data?

Advanced Econometrics I

Time Invariant Variables and Panel Data Models : A Generalised Frisch- Waugh Theorem and its Implications

α version (only brief introduction so far)

Introduction to Estimation Methods for Time Series models. Lecture 1

Transcription:

Panel Data: Linear Models Laura Magazzini University of Verona laura.magazzini@univr.it http://dse.univr.it/magazzini Laura Magazzini (@univr.it) Panel Data: Linear Models 1 / 45

Introduction Outline What is Panel Data? Motivation: the omitted variable problem An example: Production function Model specification Estimation Laura Magazzini (@univr.it) Panel Data: Linear Models 2 / 45

Introduction Before starting... OLS, GLS, IV Consider a simple regression model y i = β 0 +β 1 x i +u i What assumptions for OLS to be consistent? What assumptions for OLS to be efficient? What if u i is not homoschedastic or uncorrelated? What if x i is correlated with u i? Theory of panel data heavily built on what you learned in Econometrics I Laura Magazzini (@univr.it) Panel Data: Linear Models 3 / 45

Introduction What is panel (or longitudinal) data? It is a time-series of cross-section, where the same unit is observed over a number of periods Units can be individuals, firms, households, industries, markets, regions, countries,... Micro- vs. Macro-panels: different techniques are required for estimation Bank of Italy, European panel: large N & small T OECD: large N & small/medium/large T We work on micro-panel (large N & small T) Random sampling over the cross-sectional dimension Micro & Macro-panel: one of the most active bodies of literature in econometrics Laura Magazzini (@univr.it) Panel Data: Linear Models 4 / 45

Introduction Basic model and notation We will consider the linear model y it = x itβ +v it with i = 1,...,N (sample units), t = 1,...,T (time periods) For each sample units, we have the following T equations: y i1 = x i1β +v i1 y i2 = x i2β +v i2. y it = x it β +v it Laura Magazzini (@univr.it) Panel Data: Linear Models 5 / 45

Introduction Advantages of panel data Greater flexibility in the study of dynamics than CS or TS (ex.1) Repeated CS: in two points in time you observed 50% of women appear working. One-half of the women will be working? Or the some one-half of women will be working over all time periods? [Ben-Porath (1973)] (ex.2) Production function: economies of scale (ES) versus technical change (TC). CS only provides information about ES. TS muddle the two effects. Greater precision in estimation (greater number of observations due to pooling) Heterogeneity across units: it is possible to disentangle different sources of variance of the units of interest (permanent versus transitory factors) Can solve the omitted variables bias (fixed effects) Consistent estimates can be obtained in the presence of omitted variables, if the omitted variable vary across sample units, but it is constant over time, e.g. preferences, individual ability, propensity to patent,... Laura Magazzini (@univr.it) Panel Data: Linear Models 6 / 45

Introduction Example 1: Production function Max output given the value of the inputs Consider the case of agricultural production: Q = φ(l,v) o Q: Output o L: Input that varies over time (labor) o V: Input that remains constant over time (soil quality) You can also think of a firm production function where V represents managerial capability Typically, V is known to the farmer/manager, but unknown to the econometrician Laura Magazzini (@univr.it) Panel Data: Linear Models 7 / 45

Introduction Example 1: Econometric specification Let us consider a Cobb-Douglas production function: φ(l,v) = AL α V β Taking logs (and adding an error term, summarizing all inputs outside the farmer s control, e.g. rainfall): q = a+αl +βv +u Parameter of interest: α, i.e. the (%) increase in Q driven by a 1 percent increase in L, holding V constant Laura Magazzini (@univr.it) Panel Data: Linear Models 8 / 45

Introduction Example 1: Data availability Ideal world q = a+αl +βv +u You measure Q, L, and V on a sample of N farmers If standard hypotheses hold, the relationship can be estimated by OLS Real world V is not observable: you measure only Q and L on a sample of N farmers q = a+αl +(βv +u) = a+αl +ǫ Omitted variable bias? Laura Magazzini (@univr.it) Panel Data: Linear Models 9 / 45

Introduction Example 1: Estimation by OLS? E[q l] = a+αl +(βe[v l]+e[u l]) = a+αl +E[ε l] OLS regression of q on l allows the identification of the parameter of interest α if and only if E[ε l] = 0 We assume E[u l] = 0, therefore we need the omitted variable v (1) not to affect q once l is controlled for, i.e. β = 0 or (2) uncorrelated with l: E[v l] = 0 We do not believe (1): soil quality affects harvest (managerial capabilities affect firm output) What does economic theory tell us about hypothesis (2)? Laura Magazzini (@univr.it) Panel Data: Linear Models 10 / 45

Introduction Example 1: Relationship between L and V According to economic theory, a farmer/firm chooses L that maximizes the expected profit Let p l the cost of a unit of L, and p the price of the output Q π = AL α V β p Lp l Taking first derivatives and solving first order condition, the optimal L depends on V As a consequence, L is correlated with V: firms choose the optimal L on the basis of characteristics that are unobservable for the researcher but known to the farmer/firm! cov(v,l) 0 E[v l] 0 and, therefore, E[ε l] 0: OLS is inconsistent Laura Magazzini (@univr.it) Panel Data: Linear Models 11 / 45

Introduction Example 1: The panel solution (1) The omitted variable bias is linked to the problem of endogeneity Instrumental Variable can be applied for estimation (need to search for external instruments) What if...? The soil quality/managerial ability V is constant over time Q and L are observed for (at least) T = 2 time periods Laura Magazzini (@univr.it) Panel Data: Linear Models 12 / 45

Introduction Example 1: The panel solution (2) When t = 1: q i1 = a+αl i1 +βv i1 +u i1 When t = 2: q i2 = a+αl i2 +βv i2 +u i2 Taking the difference (we assume V constant over time v i1 = v i2 ): q i2 q }{{ i1 = α(l } i2 l i1 )+u }{{} i2 u }{{ i1 } q i l i u i The equation q i = α l i + u i does not depend from the unobserved variable v If u i satisfies classic assumptions, the regression of q i on l i can provide an estimate of the parameter of interest α. Laura Magazzini (@univr.it) Panel Data: Linear Models 13 / 45

Introduction Example 1: The panel solution (3) Advantages: repeated observations over time on the same unit allows to use estimation methods that are robust to the presence of omitted variables in the model, if these variables are constant over time. Any transformation of the initial model that eliminates the unobservable variable v is a good starting point The linearity and additivity of the model are necessary in this context. Laura Magazzini (@univr.it) Panel Data: Linear Models 14 / 45

Introduction Example 2: Return to schooling Aim: Study the variation in income associated to a change in the years of schooling The model of interest is: w i = α+ρs i +a i +ǫ i with w i indicates the income, s i is the number of years of schooling, a i represents individual ability (i = 1,...,N). Likely, individual ability affects income (cov(w,a) > 0) and is correlated with the years of schooling (cov(s,a) > 0) Unfortunately, a i is typically unobservable! Laura Magazzini (@univr.it) Panel Data: Linear Models 15 / 45

Introduction Example 2: Identification and estimation Let us suppose we observe (w,s) for the same unit at two points in time Typically, s i does not vary over time, i.e. we look at the relationship between w and s when choices about s have already been done At time 1: w i1 = α+ρs i1 +a i +ǫ i1 At time 2: w i2 = α+ρs i2 +a i +ǫ i2 Taking differences (since s i1 = s i2 ): w i2 w i2 = ǫ i2 ǫ i1 The availability of repeated observations does not improve the identification of ρ Laura Magazzini (@univr.it) Panel Data: Linear Models 16 / 45

The Omitted Variables Problem Motivation: The omitted variables problem Panel data can be used to obtain consistent estimators in the presence of omitted variables Let y and x = (x 1,...,x K ) be observable random variables Let c be an unobservable random variable We are interested in the partial effect of the observable explanatory variables x j in the population regression function: E[y x 1,...,x K,c] Assuming a linear model: E[y x 1,...,x K,c] = β 0 +x β +c, i.e. y = β 0 +x β +c +u - Interest lies in the (K 1) vector β - c is called unobserved effect Laura Magazzini (@univr.it) Panel Data: Linear Models 17 / 45

The Omitted Variables Problem What if cov(x,c) 0? y = β 0 +x β +c +u 1 Find a proxy for c and estimate β using OLS 2 Find an external instrument for x and apply 2SLS 3 If we can observe the same units at different points in time (i.e. we can collect a panel data set), we can get consistent estimates of β as long as we can assume c to be constant over time Accomplished by transforming the original data ( internal instruments) Laura Magazzini (@univr.it) Panel Data: Linear Models 18 / 45

The Omitted Variables Problem The panel solution to omitted variable bias (T = 2) Assume we can observe (y,x) at two different points in time: t = 1: (y 1,x 1 ) & t = 2: (y 2,x 2 ) The population regression function is: E[y t x t,c] = β 0 +x tβ +c or y t = β 0 +x tβ +c +u t where by definition E[u t x t,c] = 0 (t = 1,2). What about E[c x t ]? If E[x tc] = 0, we can apply OLS If E[x tc] 0, pooled OLS is biased and inconsistent But we can take first difference and eliminate c: y 2 y }{{} 1 = (x 2 x 1 ) }{{} β +u 2 u }{{} 1 y x u Laura Magazzini (@univr.it) Panel Data: Linear Models 19 / 45

The Omitted Variables Problem Can we apply OLS for estimation? (T = 2) y = x β + u Exogeneity: E[ x u] = 0 E(x 2 u 2)+E(x 1 u 1) E(x 1 u 2) E(x 2 u 1) = 0 Stronger than E(x tu t ) = 0 (t=1,2) Strict exogeneity: cov(x t,u s ) = 0 for all t and s No restrictions on the correlation between x t and c Rank condition: ranke( x x) = K If x t contains a variable that is constant across time for every member of the population, then x contains an entry that is identically zero, and rank condition fails Laura Magazzini (@univr.it) Panel Data: Linear Models 20 / 45

Linear Model Notation The basic linear panel data model (1) For a randomly drawn cross-section i, we assume (i = 1,...,N, t = 1,..,T): y it = x itβ +c i +u it c i : individual effect or individual heterogeneity u it : idiosyncratic errors/disturbances Assume c i uncorrelated with u it Assume u it homeschedastic and serially uncorrelated We consider a balanced panel : each cross-section i is observed T times (total of N T observations) Laura Magazzini (@univr.it) Panel Data: Linear Models 21 / 45

Linear Model Notation The basic linear panel data model (2) In compact form we can write: y i = x iβ +c i ι T +u i where vectors have dimension T 1 y i = (y i1,...,y it ) x i = (x i1,...,x it ) u i = (u i1,...,u it ) ι T = (1,...,1) Different estimators are available on the basis of underlying assumptions on the correlation structure of c i Asymptotics rely on N, for fixed T Laura Magazzini (@univr.it) Panel Data: Linear Models 22 / 45

Linear Model OLS estimation When pooled OLS? y it = x itβ +c i +u it = x itβ +v it v it : composite error, sum of the unobserved effect and idiosyncratic error OLS is consistent if E[x it v it] = 0: E[x it u it] = 0 E[x it c i] = 0, t = 1,2,...,T Robust standard errors: the presence of c i induces correlation over time for the same individual OLS is not efficient Laura Magazzini (@univr.it) Panel Data: Linear Models 23 / 45

Linear Model Random effect estimation Random effects structure y it = x itβ +c i +u it = x itβ +v it u it homoschedastic and serially uncorrelated: E[u i u i x i,c i ] = σ 2 ui T c i homoschedastic: E[ci 2 x i] = σc 2 As a result, the error structure has the following form: σc 2 +σu 2 σc 2... σc 2 Ω i = E[v i v i] σc 2 σc 2 +σu 2... σc 2 =...... σc 2...... σc 2 +σu 2 (T T) E[vv ] = I N Ω i = Ω = σ 2 cι T ι T +σ2 ui T Laura Magazzini (@univr.it) Panel Data: Linear Models 24 / 45

Linear Model Random effect estimation GLS estimation (unfeasible) ˆβ RE(GLS) = ( N i=1 X iω 1 i X i ) 1 ( N i=1 X i Ω 1 i y i The estimator can be obtained by applying OLS regression to Ω 1/2 X on Ω 1/2 y Ω 1/2 = [I N Ω i ] 1/2 = I N Ω 1/2 Ω 1/2 i = 1 [ σ IT u θ T ι Tι ] T with θ = 1 σ u i σ 2 u +Tσc 2 The GLS estimator can be obtained by the OLS regression of (y it θȳ i ) on (x it θ x i ) If σc 2 = 0, θ = 0: RE = OLS (no unobs. heterogeneity; Breusch Pagan LM statistic) ) Laura Magazzini (@univr.it) Panel Data: Linear Models 25 / 45

Linear Model Random effect estimation GLS estimation (feasible) In order to implement the RE procedure, we need to obtain ˆσ 2 c and ˆσ 2 u ( N ) 1( N ) ˆβ RE(FGLS) = X iˆω 1 X i X i ˆΩ 1 y i i=1 i=1 To get ˆΩ (get ˆσ 2 c and ˆσ 2 u), Wooldridge suggests: σ2 c +σu 2 from pooled OLS residuals As σc 2 = E[v it v is ], autocorrelation in OLS residuals can be exploited to obtain an estimate of σc 2 ˆσ u 2 can be recovered by taking the difference σ c 2 +σu 2 ˆσ c 2 Alternative procedure described in Greene (Maddala and Mount, 1973) In small sample you can have ˆσ c 2 < 0! Laura Magazzini (@univr.it) Panel Data: Linear Models 26 / 45

Linear Model Random effect estimation Random effect estimation y it = x itβ +c i +u it Obtained from the OLS regression of (y it θȳ i ) on (x it θ x i ) (in the more general case: OLS regression of Ω 1/2 y on Ω 1/2 X) Assumptions (stronger than OLS): (1) Strict exogeneity: E[x is u it] = 0 for each s,t = 1,...,T (2) Orthogonality between c i and each x it : E[c i x i ] = E[c i ] = 0 (3) Rank condition: rank E[X i Ω 1 X i ] = K, where Ω = E[v i v i ] Why REE? Exploit serial correlation of the error term in a GLS framework: efficient Laura Magazzini (@univr.it) Panel Data: Linear Models 27 / 45

Linear Model Random effect estimation The strict exogeneity assumption y it = x itβ +c i +u it E[y it x i1,x i2,...,x it,c i ] = E[y it x it,c i ] = x it β +c i Once x it and c i are controlled for, x is has no partial effect on y it for s t {x it,t = 1,...,T} are strictly exogenous conditional on the unobserved effect c i The strict exogeneity assumption can be stated in terms of the idiosyncratic error term: E[u it x i1,x i2,...,x it,c i ] = 0 This implies that explanatory variables in each time period are uncorrelated with the idiosyncratic error in each time period: E[x is u it] = 0 for each s,t = 1,...,T Stronger than zero contemporaneous correlation: E[x it u it] = 0 Laura Magazzini (@univr.it) Panel Data: Linear Models 28 / 45

Linear Model Fixed effect estimation Fixed effect framework We maintain the strict exogeneity assumption: E[u it x i,c i ] = 0 Allow c i to be arbitrarily correlated with x i FE is more robust than RE We can consistently estimate partial effects in the presence of time-constant omitted variable, that can be related to the observables x i BUT we cannot include time-constant factors in x i (e.g. gender, race in the analysis of individuals; foundation year for firms;...) To get estimates we transform the equation to remove c i and apply OLS Dummy variable regression Within transformation First difference Laura Magazzini (@univr.it) Panel Data: Linear Models 29 / 45

Linear Model Fixed effect estimation Dummy variable regression Least Squares Dummy Variables (LSDV) y i = x i β +c i ι T +u i Collecting the terms over the N units gives: y 1 x 1 ι T 0... 0 y 2. = x 2. β + 0 ι T... 0. y N x N 0 0... ι T c 1 c 2. c N + Or, letting d i be a dummy variable indicating unit i [ ] β y = [X d 1 d 2...d N ] +u = Xβ +Dc+u c Classical regression model with K + N parameters What if N is thousands? Laura Magazzini (@univr.it) Panel Data: Linear Models 30 / 45 u 1 u 2. u N

Linear Model Fixed effect estimation Dummy variable regression Discussion The parameter of interest is β c i : nuisance parameters that only increase the computational complexity of estimation Incidental parameter problem: increasing N also increases the number of c i to be estimated Solution: use the within gruop (WG) transformation Numerically, LSDV and WG transformation lead to the same estimate for β (result of partitioned regression just algebra) Estimate of β easier to compute with WG (an important issue some years ago...) Laura Magazzini (@univr.it) Panel Data: Linear Models 31 / 45

Linear Model Fixed effect estimation Within group (WG) transformation We transform the model in order to remove the term c i For individual i at time t: y it = x it β +c i +u it For individual i, the average over the T periods is: ȳ i = x i β +c i +ū i Therefore by taking deviations from group means, we get: y it ȳ i = (x it x i ) β +(u it ū i ) Under the assumption of strict exogeneity, we can apply OLS the the transformed data to get a consistent estimate of β Estimates of c i can be computed by ĉ i = ȳ i ˆβ x i (unbiased; not consistent for fixed T and N ) The F test can be applied for the joint significance of c i Laura Magazzini (@univr.it) Panel Data: Linear Models 32 / 45

Linear Model Fixed effect estimation Fixed effect estimation y it = x itβ +c i +u it WG: OLS regression of y it ȳ i on x it x i (removes c i ) Assumptions: (1) Strict exogeneity: E[x is u it] = 0 for each s,t = 1,...,T T ) (2) Rank condition: rank( t=1 E[ẍ itẍit] = rank E[Ẍ i Ẍ i ] = K, where ẍ it = x it x i No assumption about the correlation of c i and each x it : consistent even if E[c i x i ] 0 More robust than RE, but effect of time-invariant variables cannot be identified Efficient if u it homoschedastic and uncorrelated over time Laura Magazzini (@univr.it) Panel Data: Linear Models 33 / 45

Linear Model Fixed effect estimation First difference (FD) Another way to remove the term c i from the equation is to take first differences: y it y it 1 = (x it x it 1 ) β +(u it u it 1 ) OLS can be applied for estimation if x it is uncorrelated with u it (satisfied under strict exogeneity) However it is not efficient, due to the correlation introduced among the error terms u it and u it 1 (if u it is uncorrelated over time) For example, for T = 3 y i2 = x i2β +(u i2 u i1 ) y i3 = x i3β +(u i3 u i2 ) GLS estimation could be employed to solve the problem: you get the within-group estimator Laura Magazzini (@univr.it) Panel Data: Linear Models 34 / 45

Linear Model Fixed effect estimation First difference estimation y it = x itβ +c i +u it FD: OLS regression of y it on x it (removes c i ) Assumptions: (1) E[ x it u it] = 0, that is E[x is u it] = 0 for each t = 1,...,T;s = t 1,t,t +1 satisfied under strict exogeneity (2) Rank condition: rank E[ X i X i] = K No assumption about the correlation of c i and each x it : consistent even if E[c i x i ] 0 More robust than RE, but effect of time-invariant variables cannot be identified Laura Magazzini (@univr.it) Panel Data: Linear Models 35 / 45

Linear Model Fixed effect estimation Non-spherical u it What if Ω i σ 2 cι T ι T +σ2 ui T? That is, u it heteroskedastic and/or correlated over time If E(c i x i ) 0, then the FE estimator is still consistent (under strict exogeneity); it is no longer efficient Robust formulas should be employed for the computation of the standard errors! ˆβ FD is efficient if u it is a random walk ( u it serially uncorrelated) If E(c i x i ) = 0 (the orthogonality condition holds), then the RE estimator remains consistent (under strict exogeneity); it is no longer efficient A more general estimator of Ω i can be obtained as: N ˆΩ i = N 1 ˆv iˆv i with ˆv i pooled OLS residuals (efficient in the more general case) Assume alternative specifications: parametric assumptions about the correlation structure in u it, e.g. AR(1) and perform GLS estimation Laura Magazzini (@univr.it) Panel Data: Linear Models 36 / 45 i=1

Linear Model Which one to choose? WG vs. FD Which one to choose? WG: OLS regression of (y it ȳ i ) on (x it x i ) FD: OLS regression of y it on x it Both WG and FD produces unbiased and consistent estimates of the parameter of interest β, as c i is removed from the regression The estimate of β is not affected by the correlation (if any) between c i and x i Generally, if the two estimators are different, this can be interpreted as evidence against the assumption of strict exogeneity When T = 2, ˆβ WG = ˆβ FD If T 3, under homoschedasticity of u, ˆβ WG is to be preferred because efficient If uncorrelation and homoschedasticity of u is not satisfied, the choice depends on the assumptions about u it : If u it is a random walk, then u it is serially uncorrelated: ˆβFD is efficient In the more general set up, use FD or WG with robust s.e.! Laura Magazzini (@univr.it) Panel Data: Linear Models 37 / 45

Linear Model Which one to choose? FE vs. RE (1) Which one to choose? Traditional approach: c i treated either as parameter to be estimated vs. random disturbance Philosophical issue Wrongheaded in microeconometrics applications Modern terminology: fixed effects estimation vs. random effects estimation The difference is in the assumptions about E[c i x i ] FE allows consistent estimation of β even in cases where c i is correlated with x i RE requires c i to be uncorrelated with x i Laura Magazzini (@univr.it) Panel Data: Linear Models 38 / 45

Linear Model Which one to choose? FE vs. RE (2) Which one to choose? FE: OLS regression of (y it ȳ i ) on (x it x i ) Only within variation is considered RE: OLS regression of (y it θȳ i ) on (x it θ x i ) Both within and between variation are employed for estimation It is possible to show that ˆβ RE = Λˆβ B +(I K Λ)ˆβ FE with ˆβ B obtained from the OLS regression of ȳ i on x i σ θ = 1 u : if T, RE = FE you need a different framework! σ 2 u +Tσ 2 c Key: correlation between c i and x it If E[c i x it ] = E[c i ] (= 0): RE is consistent and efficient, FE consistent If E[c i x it ] E[c i ]: FE consistent, but RE is not Laura Magazzini (@univr.it) Panel Data: Linear Models 39 / 45

Linear Model Which one to choose? FE vs. RE The Hausman test Both FE and RE assume strict exogeneity If E[c i x] = E[c i ] (= 0) Both ˆβ FE and ˆβ RE are consistent for β: ˆβ FE ˆβ RE 0 ˆβ RE is efficient: Var(ˆβ FE ) is greater than Var(ˆβ RE ) If E[c i x] E[c i ] ˆβ FE is consistent, but ˆβ RE is biased: ˆβFE ˆβ RE 0 We can apply the Hausman test (ˆβ FE ˆβ RE ) (Var(ˆβ FE ) Var(ˆβ RE )) 1 (ˆβ FE ˆβ RE ) χ 2 K Remark: Two maintained hypotheses (not tested!): (i) strict exogeneity; (ii) random effect structure of the covariance (under the null, RE has to be efficient: valid under spherical u it ) Laura Magazzini (@univr.it) Panel Data: Linear Models 40 / 45

Linear Model Which one to choose? Between FE and RE: Correlated random effects (Mundlak, 1978; Chamberlain, 1982, 1984) RE assumes no correlation between c i and x it Richer models can be specified that relax this assumption Mundlak (1978): c i = x i π +w i with w i i.i.d. GLS estimation of the regression of y it on x it and x i produces the fixed effect estimator Chamberlain (1982, 1984): c i = x i1 π 1 +...+x it π T +w i Estimation of the extended model by minimum distance method produces the fixed effect estimator In nonlinear models, fixed effect models are not always estimable and richer RE models provide an alternative approach Laura Magazzini (@univr.it) Panel Data: Linear Models 41 / 45

Linear Model Which one to choose? FE vs. RE A robust version of the Hausman test Starting from the Mundlak (1978) definition (linear projection): c i = x i π +w i with w i i.i.d. we can write: y it = x itβ +c i +u it = x itβ + x iπ +(w i +u it ) GLS estimation produces: ˆβGLS = ˆβ FE and ˆπ GLS = ˆβ BET ˆβ FE (ˆβ BET : OLS estimate in the regression of ȳ i on x i ) Hausman test can be carried out by testing H 0 : π = 0 in the extended regression Robust version of the Hausman test: use a robust Wald statistic in the context of pooled OLS (strict exo is still needed, but we can relax on efficiency of RE under the null) Laura Magazzini (@univr.it) Panel Data: Linear Models 42 / 45

Goodness of fit The R 2 with panel data R 2 as the square of correlation coefficient between observed and fitted values Total variability can be decomposed into within and between variability: 1 NT i,t (y it ȳ) 2 = 1 NT STATA provides three R 2 statistics: Rwithin 2 = corr2 ((x it x i ) ˆβ FE,y it ȳ i ) Rbetween 2 = corr2 ( x i ˆβ B,ȳ i ) Roverall 2 = corr 2 (x itˆβ OLS,y it ) i,t (y it ȳ i ) 2 + 1 NT (ȳ i ȳ) 2 i,t Laura Magazzini (@univr.it) Panel Data: Linear Models 43 / 45

Discussion Discussion Source of the examples: Wooldridge Two questions: Is the unobserved effect c i uncorrelated with x it for all t? Is the strict exogeneity assumption (conditional on c i ) reasonable? Examples: (a) Program evaluation log(wage it ) = θ t +z itγ +δ 1 prog it +c i +u it (b) Distributed Lag Model (Hausman, Hall, Griliches, 1984) patents it = θ t +z itγ +δ 0 RD it +δ 1 RD it 1 +...+δ 5 RD it 5 +c i +u it (c) Lagged Dependent Variable log(wage it ) = β 1 log(wage it 1 )+c i +u it Laura Magazzini (@univr.it) Panel Data: Linear Models 44 / 45

Main References Main References Baltagi BH (2001): Econometric Analysis of Panel Data, John Wiley & Sons Ltd. Chamberlein G (1984): Panel Data, in Griliches and Intriligator, (eds.) Handbook of Econometrics, Vol.2, Elsevier Science, Amsterdam Greene, WH (2003): Econometric Analysis, Prentice Hall, ch.13 Hsiao C (2003): Analysis of Panel Data, Cambridge University Press Mundlak Y (1978): On the Pooling of Time Series and Cross Section Data, Econometrica, 46(1), 69-85 Verbeek M (2006): A Guide to Modern Econometrics, ch. 10 Wooldridge, JM (2002): Econometric Analysis of Cross Section and Panel Data, MIT Press: Cambridge, ch.10 Laura Magazzini (@univr.it) Panel Data: Linear Models 45 / 45