21
Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences Charles University in Prague Fall 2012 1 / 21

Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

  • Upload
    vantu

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Econometrics

Week 5

Institute of Economic StudiesFaculty of Social Sciences

Charles University in Prague

Fall 2012

1 / 21

Page 2: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Recommended Reading

For the todayPooling cross sections across time. Simple panel datamethods.Chapter 13 (pp. 408 – 434).

For the next weekAdvanced Panel Data Methods.Chapter 14 (pp. 441 – 460).

2 / 21

Page 3: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Panel Data vs. Pooled Cross Sections

Up until now, we covered multiple regression analysis using:Pure cross-sectional data – each observation represents anindividual, firm, etc.Pure time series data – each observation represents aseparate period.In an economic applications, we often have data which haveboth these dimensions – we may have cross sections fordifferent time periods.We will talk about 2 types of pooled data:

Independently pooled cross sectionsPanel data (sometimes called longitudinal data)

Panel data are not independently distributed across time aspooled cross sections!We will cover basics to introduce the methods.

3 / 21

Page 4: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Panel Data vs. Pooled Cross Sections

Pooled Cross SectionsPopulation surveys - each period, Statistical Bureauindependently samples the population⇒ At each period, the sample is different.these are independent cross-sections, but we can take timeinto account.

Panel DataEach year, the European Community Household Panelsurveys the same individuals on a range of questions:income, health, education, employment, etc.These are cross-sections with time order.We have observations for each individual with temporalordering.Sample does not change.

4 / 21

Page 5: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

What is the basic intuition?

Time Series vs. Panel Data

yit = β0 + β1xit1 + uit uit ∼ N(0,Σ)

t = 1, 2, . . . , n

i = 1, 2, . . . , N

cross-sectionsBut let as introduce the intuition step by step first...

5 / 21

Page 6: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Pooling Independent Cross Sections Across Time

If a random sample is drawn at each time period, resultingdata are independently pooled cross sections.Reasons for pooling cross sections:

To increase sample size ⇒ more precise estimators.To investigate the effect of time (simply add dummyvariable)

We may assume that parameters remain constantwagesit = β0 + β1educit + uit

Alternatively, we may want to investigate the effect of timewagesit = β0t + β1educit + uit

Or, we may want to investigate whether relations change in timewagesit = β0 + β1teducit + uit

6 / 21

Page 7: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Pooling Independent Cross Sections Across Timecont.

Let’s find out if an hourly wage pooled across the years 1978and 1985 was dependent on an education and gender gap.

Example: Changes in the Return to Education

log(wage) = β0 + δ0y85 + β1educ+ δ1y85educ+ β2female+ u

y85 is a dummy equal to 1 if observation is from 1985 andzero if it comes from 1978 (the number of observations isdifferent + different people in the sample).Thus the intercept for 1978 is β0 and intercept for 1985 isβ0 + δ0.The return to education in 1978 is β1 and the return toeducation in 1985 is β1 + δ1.δ1 measures the 7-year change. We can test the nullhypothesis that nothing has changed over the periodH0 : δ1 = 0 to alternative that the effect has been reduced,H0 : δ1 > 0.

7 / 21

Page 8: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

The Chow Test for Structural Change

We may want to determine if regression function differs across 2groups

1 2 3 4 5 6 70

2

4

6

8

10

x

y

y = α1 + β1x+ u1 vs. y = α2 + β2x+ u2

Clearly, α1 6= α2 and β1 6= β2

Resulting y = α0 + β0x+ u0 in the worst fit.8 / 21

Page 9: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

The Chow Test for Structural Change cont.

We may want to test if there are 2 (or more) periods in aregression:

yit = β0t + β1txit + uit

It may not be as obvious as from the example on previousslide.H0 : β01 = β02, β11 = β12.Compute simple F test.Alternatively, use pooled cross-sections as in previousexample with wages.

9 / 21

Page 10: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Policy Analysis with Pooled Cross Sections

Example: What effect will building a garbage incinerator(in Czech “spalovna”) have on housing prices? (Wooldridgebook, Ex.13.3.)Consider only simple one-period case of 1981 data:

prices = β0 + β1near + u

where near is dummy variable (1 for houses nearincinerator, 0 otherwise)The hypothesis is that prices of houses near the incineratorfall when it is built:

H0 : β1 = 0 vs. HA : β1 < 0

Unfortunately, this test does not really imply that buildingincinerator is causing the lower prices.β̂1 is inconsistent as cov(near, u) 6= 0.

10 / 21

Page 11: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Policy Analysis with Pooled Cross Sections cont.

Let’s include also another year into the analysis so we canreally study the impact.t = {1978, 1981} now:

pricesit = β0 + β1nearit + β3D1981it + β4nearitD

1981it uit

The hypothesis is the same, that location of incinerator willdecrease the prices, but:

H0 : β4 = 0 vs. HA : β4 < 0

β̂4 is called difference-in-differences estimator.

11 / 21

Page 12: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Policy Analysis with Pooled Cross Sections cont.

Let’s look at the logics of the difference-in-differencesestimator.

E[prices|near, 1981] = β0 + β1 + β3 + β4

E[prices|near, 1978] = β0 + β1

The difference:

E[∆pricesnear] = E[prices1981 − prices1987|near] = β3 + β4

E[prices|far, 1981] = β0 + β3

E[prices|far, 1978] = β0

The difference:

E[∆pricesfar] = E[prices1981 − prices1987|far] = β3

The difference: E[∆pricesnear −∆pricesfar] = β4

β4 reflects the policy effect if the incinerator is built withno “different inflation”.

12 / 21

Page 13: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Two-period Panel Data

For a cross-section of individuals, schools, firms, cities, etc.,we have two time periods of data.Data are not independent as in pooled cross-sections, sothey can be more helpful.It can be used to address some kinds of omitted variablebias.

Fixed Effects Model (Unobserved Effects Model)

yit = β0 + βxit + ai + uit

ai is time-invariant, individual specific, unobserved effecton the level of yit.ai is reffered to as fixed effect – fixed over time.ai is reffered to as unobserved heterogeneity, orindividual heterogeneity.uit is idiosyncratic error.

13 / 21

Page 14: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Two-period Panel Data cont.

We can rewrite the model as:

yit = β0 + βxit + νit,

where νit = ai + uit

νit is also called composite error.We can simply estimate this model by pooled OLS.But it will be biased and inconsistent if ai and xit arecorrelated: cov(ai, xit) 6= 0 ⇒ heterogeneity bias.In real-world applications, the main reason for collectingthe panel data is to allow for the unobserved effect ai to becorralated with explanatory variables.I.e. we want to explain crime, and allow unmeasured cityfactors ai affecting the crime to be correlated with i.e.unemployment rate.Simple solution follows...

14 / 21

Page 15: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Two-period Panel Data cont.

This is simple to solve as ai is constant over time.Solution: first - differenced estimator

Let’s write

yi2 = β0 + βxi2 + ai + ui2, (t = 2)yi1 = β0 + βxi1 + ai + ui1, (t = 1)

Subtracting second equation from the first one gives:

∆yi = β∆xi + ∆ui

Here, ai is “differenced away”.And we have standard cross-sectional equation.If cov(∆ui,∆xi) = 0, ˆβFD is consistent (strict exogeneity).

15 / 21

Page 16: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Two-period Panel Data cont.

Differencing two years is powerful way to controlunobserved effects.If we use standard cross-sections instead, it may suffer fromomitted variables.But, it is often very difficult to collect panel data (i.e. forindividuals), as we have to have the same sample.Moreover, ai can greatly reduce the variation in theexplanatory variables.Still, this is solution only when we have 2 data periods(more general next lecture).Organization of Panel Data is crucial (more during theseminars).

16 / 21

Page 17: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Differencing with More than Two Periods

We can extend FD to more than two periods.We simply difference adjacent periods

A general fixed effects model for N individuals and T=3.yit = δ1 + δ2d2t + δ3d3 + β1xit1 + . . .+ βkxitk + ai + uit,

The total number of observations is 3N.The key assumption is that idiosyncratic errors areuncorrelated with explanatory variables: cov(xitj , uis) = 0for all t, s and j ⇒ strict exogeneity.How to estimate? Simply difference equation for t = 1 fromt = 2 and t = 2 from t = 3.It will result in 2 equations which can be estimated bypooled OLS consistently under the CLM assumptions.We can simply further extend to T periods.Correlation and heteroskedasticity are treated in the sameway as in time series data.

17 / 21

Page 18: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Assumptions for Pooled OLS Using FirstDifferences

Assumptions revisited

Assumption FD1For each i, the model isyit = β1xit1 + . . .+ βkxitk + ai + uit, t = 1, . . . , T,where parameters βj are to be estimated and ai is theunobserved effect.

Assumption FD2We have a random sample from the cross section.

Assumption FD3Let Xi denote xitj , t = 1, . . . , T , j = 1, . . . , k. For each t, theexpected value of the idiosyncratic error given the explanatoryvariables in all time periods and the unobserved effect is zero:E(uit|Xi, ai) = 0.,

18 / 21

Page 19: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Assumptions for Pooled OLS Using FirstDifferences cont.

An important implication of Ass. FD3 is that E(∆uit|Xi) = 0,t = 2, . . . , T. Once we control for ai, there is no correlationbetween the xisj and remaining error uit for all s and t. xitj isstrictly exogenous conditional on the unobserved effect.

Assumption FD4: No Perfect Collinearity

Each explanatory variable changes over time (for at least somei), and no perfect linear relationship exist among theexplanatory variables.

Assumption FD5: HomoskedastictityThe variance of the differenced error, conditional on allexplanatory variables, is constant: V ar(∆uit|Xi) = σ2, for allt = 2, . . . , T .

19 / 21

Page 20: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Assumptions for Pooled OLS Using FirstDifferences cont.

Assumption FD6: No Serial CorrelationFor all t 6= s, the differences in the idiosyncratic errors areuncorrelated (conditional on all explanatory variables):Cov(∆uit,∆uis|Xi) = 0, t 6= s.

Under the Ass. FD1 – FD4, the first-difference estimatorsare unbiased.Under the Ass. FD1 – FD6, the first-difference estimatorsare BLUE.

Assumption FD7: NormalityConditional on Xi, the ∆uit are independent and identicallydistributed normal random variables.

Last assumptions assures us that FD estimator is normallydistributed, t and F statistics from the pooled OLS on thedifferenced data have exact t and F distributions.

20 / 21

Page 21: Econometrics - Welcome to UTIAstaff.utia.cas.cz/barunik/files/Econometrics/Econometrics_Lecture... · Econometrics Week 5 Institute of Economic Studies Faculty of Social Sciences

Thank you

Thank you very much for your attention!

21 / 21