<<

of

Jakub Mućk

Department of Quantitative Economics

Meeting # 2

Jakub Mućk Econometrics of Panel Data Meeting # 2 1 / 26 Outline

1 Fixed effects model The Dummy Variable The Fixed Effect (Within Group) Estimator

2 Random Effect model Testing on the random effect

3 Comparison of Fixed and Random Effect model

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 2 / 26 One-way Error Component Model

In the model:

0 yit = α + Xitβ + uit i ∈ {1,..., N }, t ∈ {1,..., T} (1)

it is assumed that all units are homogeneous. Why? One-way error component model:

ui,t = µi + εi,t (2)

where:

I µi – the unobservable individual-specific effect; I εi,t – the remainder disturbance.

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 3 / 26 Fixed effects model

We can relax assumption that all individuals have the same coefficients

yit = αi + β1x1it + ... + βkxkit + uit (3)

2 where uit ∼ N (0, σu).

Note that an i subscript is added to only intercept αi but the slope coefficients, β1, ..., βk are constant for all individuals.

An individual intercept (αi) are include to control for individual-specific and time-invariant characteristics. That intercepts are called fixed effects.

Independent variables (x1it ... xkit) cannot be time invariant. Fixed effects capture the individual heterogeneity. The estimation: i) The least squares dummy variable estimator ii) The fixed effects estimator

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 4 / 26 The Least Squares Dummy Variable Estimator

The natural way to estimate fixed effect for all individuals is to include an indicator variable. For example, for the first unit: ( 1 i = 1 D = (4) 1i 0 otherwise

The number of dummy variables equals N . It’s not feasible to use the least square dummy variable estimator when N is large We might rewrite the fixed regression as follows:

N X yit = αiDji + β1x1it + ... + βkxkit + ui,t (5) j=1

Why α is missing?

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 5 / 26 The Least Squares Dummy Variable Estimator

In the matrix form: y = Xβ + u (6) where y is NT × 1, β is (K + N ) × 1, X is NT × (K + N ) and u is NT × 1.

 α1  .  1 0 ... 0 x11 ... xk1   y1   .   .  0 1 ... 0 x12 ... xk2 y2  α  X =   and y =   and β =  N   ......   .   β   ......   .   1   .  0 0 ... 1 x1N ... xkN yN  .  βK

where xij is the vector of observations of the jth independent variable for unit i over the time and yi is the vector of observation of the explained variable for unit i. Then: ˆLSDV 0 −1 0 LSDV LSDV ˆLSDV ˆLSDV 0 β = X X X y = [ˆα1 ... αˆN β1 ... βK ] (7)

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 6 / 26 The Least Squares Dummy Variable Estimator

We can test estimates of intercept to verify whether the fixed effects are different among units:

H0 : α1 = α2 = ... = αN (8)

To test (8) we estimate: i) unrestricted model (the least squares dummy variable estimator) and ii) restricted model (pooled regression). Then we calculate sum of squared errors for both models: SSEU and SSER. (SSE − SSE )/(N − 1) F = R U (9) SSEU /(NT − K)

if null is true then F ∼ F(N−1,NT−K).

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 7 / 26 The Fixed Effect (Within Group) Estimator

Let’s start with simple fixed effects specification for individual i:

yit = αi + β1x1it + ... + βk xkit + uit t = 1,..., T (10)

Average the observation across time and using the assumption on time-invariant parameters we get: y¯i = αi + β1x¯1i + ... + βk x¯ki +u ¯i (11) 1 PT 1 PT 1 PT 1 PT wherey ¯i = T t=1 yit ,x ¯1i = T t=1 x1it ,x ¯ki = T t=1 xkit andu ¯i = T t=1 ui Now we substract (11) from (10)

(yit − y¯i ) =( αi − αi ) + β1(x1it − x¯1i ) + ... + βk (xitk − x¯ki ) + (uit − u¯i ) (12) | {z } =0

Using notation:y ˜it = (yit − y¯i ),x ˜1it = (x1it − x¯1i ),x ˜kit = (xkit − x¯ki )u ˜it = (uit − u¯i ), we get y˜it = β1x˜1t + ... + βk x˜kt +u ˜i,t (13) Note that we don’t estimate directly fixed effects.

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 8 / 26 The Fixed Effect (Within Group) Estimator

The Fixed Effect Estimator or the within (group) estimator in vector form: y˜ = X˜ β +u ˜ (14) wherey ˜ is NT × 1, β is K × 1, X˜ is NT × K andu ˜ is NT × 1 and:

 x˜11 ... x˜k1   y˜1    β1 x˜12 ... x˜k2 y˜2 ˜      .  X =  . . .  andy ˜ =  .  and β = .  . .. .   .    βK x˜1N ... x˜kN y˜N Then: ˆFE ˜ 0 ˜ −1 ˜ 0 ˆFE ˆFE 0 β = X X X y˜ = [β1 ... βK ] (15) The standard errors should be adjusted by using correction factor: r NT − K (16) NT − N − K where K is number of estimated parameters without constant. The fixed effects estimates can be recovered by using the fact that OLS fitted regression passes the point of the means. FE ˆFE ˆFE ˆFE αˆi =y ¯i − β1 x¯1i − β2 x¯2i − ... − βk x¯ki (17)

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 9 / 26 Empirical example

Grunfeld’s (1956) investment model:

Iit = α + β1Kit + β2Fit + uit (18)

where

Iit – the gross investment for firm i in year t;

Kit – the real value of the capital stocked owned by firm i;

Fit – is the real value of the firm (shares outstanding). The dataset consists of 10 large US manufacturing firms over 20 years (1935–54).

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 10 / 26 Empirical example

Pooled OLS FE α −42.714 −58.744 (9.512) (12.454) [0.000] [0.000] β1 0.231 0.310 (0.025) (0.017) [0.000] [0.000] β2 0.116 0.110 (0.006) (0.012) [0.000] [0.000]

Note: The expressions in round and squared brackets stand for standard errors and probability values corresponding to the null about parameter’s insignificance, respectively.

Iit = α + β1Kit + β2Fit + uit

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 11 / 26 Empirical example

Pooled OLS Pooled OLS FE FE robust se robust se α −42.714 −42.714 −58.744 −58.744 (9.512) (11.575) (12.454) (27.603) [0.000] [0.000] [0.000] [0.062] β1 0.231 0.231 0.310 0.310 (0.025) (0.049) (0.017) (0.053) [0.000] [0.000] [0.000] [0.000] β2 0.116 0.231 0.110 0.110 (0.006) (0.007) (0.012) (0.015) [0.000] [0.000] [0.000] [0.000]

Note: The expressions in round and squared brackets stand for standard errors and probability values corresponding to the null about parameter’s insignificance, respectively.

Iit = α + β1Kit + β2Fit + uit

Jakub Mućk Econometrics of Panel Data Fixed effects model Meeting # 2 12 / 26 Outline

1 Fixed effects model The Least Squares Dummy Variable Estimator The Fixed Effect (Within Group) Estimator

2 Random Effect model Testing on the random effect

3 Comparison of Fixed and Random Effect model

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 13 / 26 Note that independent variables can be time invariant. Individual (random) effects are independent:

E (µi, µj) = 0 ifi 6= j. (21) Estimation method: GLS (generalized least squares).

Random Effect model

Let’s assume the following model

0 yit = α + Xitβ + uit, i ∈ {1,..., N }, t ∈ {1,..., T}. (19)

The error component (ut) is the sum of the individual specific random com- ponent (µi) and idiosyncratic disturbance (εi,t):

uit = µi + εit, (20)

2 where µi ∼ N (0, σµ); 2 and εi,t ∼ N (0, σε ).

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 14 / 26 Random Effect model

Let’s assume the following model

0 yit = α + Xitβ + uit, i ∈ {1,..., N }, t ∈ {1,..., T}. (19)

The error component (ut) is the sum of the individual specific random com- ponent (µi) and idiosyncratic disturbance (εi,t):

uit = µi + εit, (20)

2 where µi ∼ N (0, σµ); 2 and εi,t ∼ N (0, σε ). Note that independent variables can be time invariant. Individual (random) effects are independent:

E (µi, µj) = 0 ifi 6= j. (21) Estimation method: GLS (generalized least squares).

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 14 / 26 RE model – variance of the error termI

The error component (ut): uit = µi + εit, (22) 2 2 where µi ∼ N (0, σµ) and εi,t ∼ N (0, σε ). Diagonal elements of the variance covariance matrix of the error term:

2  2 2  E uit = E µi + E εit + 2cov (µi, εit) 2 2 = σµ + σε

Non-diagonal elements of the variance covariance matrix of the error term (t 6= s): cov (uit, uis) = E (uituis) = E [(µi + εit)(µi + εis)] . After manipulation:

2 2 cov (uit, uis) = E µi + E (µiεit) + E (µiεis) + E (εitεis) = σµ | {z } | {z } | {z } | {z } 2 0 0 0 σµ

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 15 / 26 RE model – variance covariance matrix of the error termII

Finally, variance covariance matrix of the error term for given individual (i):

 1 ρ . . . ρ   .  0 2 2  ρ 1 . ρ  E (ui.ui.) = Σu,i = σµ + σε   , (23)  . . .. .   . . . .  ρ ρ . . . 1

where 2 σµ ρ = 2 2 . σµ + σε

Note that Σu is block diagonal with equicorrelated diagonal elements Σu,i but not spherical. Although disturbances from different (cross-sectional) units are independent presence of the time invariant random effects (µi) leads to equi-correlations among regression errors belonging to the same (cross-sectional) unit.

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 16 / 26 GLS estimator

Consider the following linear model: y = βX + u (24)

0 2 when the variance covariance matrix of the error term (E(uu ) = σ I ) is spherical then the OLS estimator is motivated: −1 βOLS = X 0X X 0y. (25) Let’s relax the assumption about the variance covariance matrix of the error term, 0 i.e., E(uu ) = Σ and Σ is not diagonal but is positively defined. We can transform the baseline model (24) as follows: Cy = CβX + Cu, (26)

− 1 where C = Σ 2 . The variance covariance matrix of the error term becomes in the transformed model: 0 0  − 1 − 1 0 0 −1  E CuC u = E Σ 2 u(Σ 2 ) u = E Σ Σ = I . (27) After manipulations, the GLS estimator of the vector β is: −1 βGLS = X 0Σ−1X X 0Σ−1y. (28) How to choose Σ?.

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 17 / 26 Model estimation: RE

Using the GLS estimator we have:

−1 βˆRE = X 0Σ−1X X 0Σ−1y, (29)   −1 Var βˆRE = X 0Σ−1X , (30)

but we don’t know Σ ! We know that Σ = E (uu0) is block-diagonal and:  0 if i 6= j,  2 2 cov (uit, ujs) = σµ + σε if i = j and s = t, 2 2  ρ σµ + σε if i = j and s 6= t,

2 2 2 where ρ = σµ/ σµ + σε .

But we do not know σµ and σε.

There are many different strategies to estimates σµ and σε.

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 18 / 26 Model estimation: RE – example

∗ ∗ We use the GLS transforms of the independent (xjit ) and dependent variable (yit ):

∗ ˆ xjit = xjit − θi x¯ji ∗ ˆ yit = yit − θi y¯i

wherex ¯ji andy ¯i are the individuals means. Estimates of the transforming parameter:

r 2 ˆ σˆε θi = 1 − 2 2 . Ti σˆµ +σ ˆε

The estimates of the idiosyncratic error component σε:

Pn PTi uˆ2 σˆ2 = i t it ε NT − N − K + 1 where 2 Within ˆWithin uˆit = (yit − y¯i +y ¯) − αˆ − (xit − x¯i +x ¯) β , whereα ˆWithin and βˆWithin stand for the within estimates.

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 19 / 26 Model estimation: RE – example

2 The error variance of individual specific random component (σµ):

Between 2 2 SSR σˆε σˆµ = − N − K T¯ ¯ ¯ Pn Between where T is the harmonic mean of Ti , i.e., T = n/ i (1/Ti ), and SSR stands for the sum of squared residuals from the between regression (details on further lectures):

n Between X Between Between SSR = y¯i − αˆ − x¯i βˆ i

where βˆBetween andα ˆBetween stand for the coefficient estimates from the between regression.

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 20 / 26 Model estimation: RE – Swamy-Arora method

Method which gives more precise estimates in small samples and unbalanced panels.

The estimation of σε (the idiosyncratic error component) is the same =⇒ it bases on the residuals from the within regression. The variance or the individual error term: SSRBetween − (N − K)σ ˆ2 σˆ2 = ε , µ,SA NT − tr

where SSRBetween is the sum of the squared residuals from the between regression and n −1 o tr = trace X 0PX X 0ZZ 0X

n 1 0 o P = diag eTi eTi Ti

Z = diag {eTi }

where eTi is a Ti × 1 vector of ones.

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 21 / 26 Testing on the random effect

2 In the standard RE model, the variance of the random effect is assumed to be σµ 2  (µ ∼ N 0, σµ ). We can test for the presence of heterogeneity:

H0 : σµ = 0

H1 : σµ 6= 0 If the null hypothesis is rejected, then we conclude that there are random indi- vidual differences among sample members, and that the random effects model is appropriate. If we fail to reject the null hypothesis, then we have no evidence to conclude that random effects are present. We construct the Lagrange multiplier statistic:  2 r PN PT uˆ ! NT i=1 t=1 it LM = − 1 , (31) 2(T − 1) PN PT 2 i=1 t=1 uˆit

whereu ˆi,t stands for the residuals, i.e.,u ˆit = yit − αˆ0 − βˆ1x1it − ... − βˆk xkit . Conventionally, LM ∼ χ2(1). In large samples, LM ∼ N (0, 1).

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 22 / 26 Empirical example

Pooled OLS FE RE α −42.714 −58.744 −57.834 (9.512) (12.454) (28.899) [0.000] [0.000] [0.045] β1 0.231 0.310 0.308 (0.025) (0.017) (0.012) [0.000] [0.000] [0.000] β2 0.116 0.110 0.110 (0.006) (0.012) (0.010) [0.000] [0.000] [0.000]

Note: The expressions in round and squared brackets stand for standard errors and probability values corresponding to the null about parameter’s insignificance, respectively.

Iit = α + β1Kit + β2Fit + uit

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 23 / 26 Empirical example

Table: The estimates of the RE model

σˆµ 84.20 σˆε 52.77 ρˆ 0.72 LM 798.16 H0 : σµ = 0 [0.000]

Jakub Mućk Econometrics of Panel Data Random Effect model Meeting # 2 24 / 26 Outline

1 Fixed effects model The Least Squares Dummy Variable Estimator The Fixed Effect (Within Group) Estimator

2 Random Effect model Testing on the random effect

3 Comparison of Fixed and Random Effect model

Jakub Mućk Econometrics of Panel Data Comparison of Fixed and Random Effect model Meeting # 2 25 / 26 Comparison of Fixed and Random Effect model

If the true DGP includes random effect then RE model is preferred: The random effects estimator takes into account the random sampling process by which the data were obtained. The random effects estimator permits us to estimate the effects of variables that are individually time-invariant. The random effects estimator is a generalized least squares estimation proce- dure, and the fixed effects estimator is a least squares estimator.

Endogenous regressors If the error term is correlated with any explanatory variable then both OLS and GLS of parameters are biased and inconsistent.

Jakub Mućk Econometrics of Panel Data Comparison of Fixed and Random Effect model Meeting # 2 26 / 26