econometrics: honor's exam review sessioneconometrics: honor’s exam review session david...

62
OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Serie Econometrics: Honor’s Exam Review Session David Rezza Baqaee [email protected] April 3, 2014

Upload: others

Post on 03-Mar-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Econometrics:Honor’s Exam Review Session

David Rezza [email protected]

April 3, 2014

Page 2: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Information

Exam: Wednesday April 9th from 3PM to 6PM.

Bring a calculator and extra pens.

Notes are not allowed.

There is no surprise in the exam. Use previous exams andproblem sets as a guideline.

The review session only covers the main topics.

You are responsible for ALL the materials you’ve learned inclass.

Time Management is critical. Do not spend too much time ona single question.

Page 3: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Table of Contents

1 OLS

The AssumptionsOmitted Variable BiasConditional Mean IndependenceHypothesis Testing and Confidence IntervalsHomoskedasticity vs. HeteroskedasticityNonlinear Regression Models: Polynomials, Logtransformations, and Interaction Terms.

2 Discrete Dependent Variables

Linear Probability ModelProbit and Logit ModelOrdered Probit Model

3 Panel Data

Fixed Effects: Entity FE and Time FESerial Correlation and Clustered HAC SE

Page 4: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Table of Contents

1 Instrumental Variables

Conditions for valid instrumentsTests of instrument validity2SLS estimation

2 Regression Discontinuity Design3 Internal and External Validity

Threats to internal validityThreats to external validity

4 Time Series Data

StationarityForecasting Models: AR and ADL modelsDynamic Causal Effects: Distributed Lag ModelsSerial Correlation and Newey-West HAC SE

Page 5: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Outline

OLS

Discrete RVs

Panel Data

Instrumental Variables

Regression Discontinuity Design

Internal and External Validity

Time Series

Page 6: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Least Squares Assumptions

Regression Model: Yi = β0 + β1Xi + ui ,1 The error term ui has conditional mean zero given

Xi : E (ui |Xi ) = 02 (Xi ,Yi ) are iid.3 Xi and Yi have nonzero finite fourth moments.4 No perfect multicollinearity (in multivariate regression).

If all assumptions are satisfied, OLS estimates are unbiased,consistent, and asymptotically normal.

Page 7: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Perfect Multicollinearity

The regressors are said to be perfectly multicollinear if one ofthe regressors is a perfect linear function of the otherregressors.

Suppose X1i = 2X2i . Can we estimate the regressionYi = β0 + β1X1i + β2X2i + ui?

Substitute X1i = 2X2i to get: Yi = β0 + (2β1 + β2)X2i + ui .So we can only identify 2β1 + β2.

Dummy variable trap.

Page 8: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Univariate Regression Model

Do married men make more money than single men?

lwagei = β0 + β1marriedi + ui

How would you interpret β0 and β1?

β0 is the average log wage of single men.β1 is the difference between the average log wage of single andmarried men.

What is likely to be in the error term?

Captures all factors besides marital status that might affect logwage. Education, experience, and ability are potential factorsthat are omitted. Is there an omitted variable bias?

Page 9: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Omitted Variable Bias

Population Regression equation

Yi = β1X1i + β2X2i + εi .

Suppose we don’t observe X1i and estimated

Yi = β2X2i + εi ,

E (b2) = β2 + δβ1, where δ =Cov(X1,X2)

Var(X2).

There is a bias of δβ1.

When is there an OVB problem?

The omitted variable affects the outcome (β1 6= 0).The omitted variable is correlated with the regressor (δ 6= 0).

Can you predict the sign of OVB?

How might you solve the OVB problem?

Page 10: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Multivariate Regression Model

lwagei = β0 + β1marriedi + β2edui + β3expi + β4jobi + ui .

How would you interpret β0 and β1?

β0: Predicted value of lwage when all regressors are zero.β1: Predicted change in married on lwage holding all otherregressors constant.

Suppose that we are interested in the causal effect of marriageon lwage. Can we be sure that there is no OVB after weinclude more variables?

Suppose we are only interested in the effect of marriage onlwage. Do we really need the exogeneity assumptionE (ui |Xi1,Xi2,Xi3,Xi4) = 0 to get β1? Nope.

Page 11: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Conditional Mean Independence

Yi = β0 + β1Xi + β2W1i + · · ·+ β1+rWri + ui

X : treatment variable, W : control variables.

IF we are only interested in the causal effect of X on Y , wecan use a weaker assumption of conditional meanindependence: E (u|X ,W ) = E (u|W ).

The conditional expectation of u does not depend on X if wecontrol for W . Conditional on W , X is as if randomlyassigned.

Under conditional mean independence, OLS gives unbiasedand consistent estimator for β1 but the coefficients for W canstill be unbiased.

Page 12: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Measure of Fit

What is R2 and what does it tells us?

R2 is the fraction of variation of the dependent variable whichis explained by our model. In other words, its 1 minus the ratioof the variance of the residual to the variance of the outcome.

What is adjusted R2?

Unlike R2, adjusted R2 adjusts for the number of regressors ina model because it penalizes for overfitting. Useful forforecasting.

What is SER?

The Standard Error of Regression estimates the standarddeviation of the error term. A large SER implies that thespread of observations around the regression is large, andimplies lack of precision.

Should a low R2 discourage us in a causal study?

Page 13: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Hypothesis Testing

H0 : β1 = 0 and H1 : β1 6= 0.

T-test: By the central limit theorem, t-statistics are normallydistributed for large samples.

t-statistic: β1−0

se(β1)∼ N (0, 1), IF H0 holds.

If |t| > 1.96, we reject null hypothesis at %5 significance level.

P-value: the p-value is the probability of drawing a value ofthe statistic that differs from 0 by at least as much as thevalue we actually calculated if the null is true. If p-value isless than 0.05, we reject the null at 0.05 significance level.

P-value : Pr(|z | > |t|) ≈ 2Φ(−|t|).

Page 14: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Example for Hypothesis Testing

Let µm be the mean log hourly wage in the population ofmarried men and µs be the population mean for single men.Construct null hypothesis and two-sided alternative hypothesisto test the difference between two means: H0 : µs = µm andH1 : µs 6= µm.

What is the sample mean estimator of µs − µm? Ys − Ym.

Compute the SE of the sample mean.

SE (Ys − Ym) =√

S2s

ns+ S2

mnm. (Uses iid assumption)

Calculate t-statistic: t = (Ys−Ym)−0

SE(Ys−Ym).

Suppose that the t-statistic > 1.96. What do we learn?We reject the null at 5 percent significance level. Therefore,we learn that married and single men do not make the sameamount of money as a forecasting matter (if no OVB, then asa causal matter).

Could you test this with a regression? We test if β1 (in theunivariate regression) is significantly different from zero.

Page 15: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Confidence Interval

Confidence Interval: An interval that contains the truepopulation parameter with a certain pre-specified probability(usually 95%).

Confidence interval is useful because it is impossible to learnthe exact value of population mean using the information inone sample due to the random sampling error. however, it ispossible to use this data to construct a set of values thatcontains the true population mean with a certain probability.

How do we construct the 95% confidence interval?

Pr(−1.96 < t < 1.96) = 0.95

Pr(−1.96 < β1−β1

SE(β1)< 1.96) = 0.95

Pr(β1 − 1.96SE (β1)) < β1 < β1 + 1.96SE (β1) = 0.95

If confidence interval contains 0, we fail to reject the null thatβ1 = 0.

Page 16: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Homoskedasticity vs. Heteroskedasticity

Homoskedasticity: The error term ui is homoskedastic if thevariance of the conditional distribution of ui given regressorsis constant.

Heteroskedasticity: The variance of the error term ui

conditional on regressors depends on the regressors.

Intuitive example: Imagine if measuring someone’s heightbecomes more difficult the bigger the person is. Then thevariance of the error term is larger for regressor values thatpredict bigness.

What happens if we have heteroskedasticity?

OLS is still unbiased and consistent. However, the SEcalculated using homoskedasticity only formula gives us badconfidence intervals. Need to use heteroskedasticity-robustSEs.

Page 17: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Joint Hypothesis Testing

For joint tests, we use the F-test.

Under the null hypothesis, in large samples, the F-statistic hasa sampling distribution of Fq,∞, where q is the number ofcoefficients you are testing.

If F-stat is bigger than the critical value or p-value is smallerthan 0.05, we reject the null at 5%.

Example: If H0 : β1 = β2 = 0 and F-stat > 3, we reject thenull. At least one coefficient is not zero.

Page 18: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Nonlinear Regression (1)

Polynomials in X

Yi = β0 + β1Xi + β2X 2i + β3X 3

i + ui .

The coefficients do not have a simple interpretation because itis impossible to change X holding X 2 constant. Instead, mustuse thought experiments to interpret coefficients.

Which polynomial model is better?

t-test or F-test is one approach. Really depends on yourobjective (forecasting or causal analysis).

How do we deal with functional form problems for discretevariables?

Page 19: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Nonlinear Regression (2)

log(x + ∆x)− log(x) = log(x+∆x

x

)= log(1 + ∆x

x ) ≈ ∆xx .

Case Regression Specification Interpretation of β1

Linear-log Yi = β0 + β1 log(Xi ) + ui 1 percent change in X → .01β1 change in Y .Log-linear log(Y )i = β0 + β1Xi + ui 1 unit change in X → 100β1% change in Y .

Log-log log(Y )i = β0 + β1 log(Xi ) + ui 1% change in X → β1% change in Y .

Page 20: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Nonlinear Regression (3)

Nonlinear interactions are also important.

Consider the regression Yi = β0 + β1X1i + β2X2i + ui .

If we believe the effect of X2i on Y depends on X1i we caninclude the interaction term X1i · X2i as a regressor.

This can form the basis of Difference-in-Differencesestimators.

Page 21: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Example of the Interaction Terms

Let Black = 1 if observation if black and 0 otherwise.Exp = yearsofexperience. If we believe that the effect ofexperience on wage depends on individual’s race, we add theinteraction term to the regression.

lwagei = β0 + β1Black + β2Exp + β3black ∗ exp + u

If black = 1, Yi = β0 + β1Black + (β2 + β3) Exp + u.

If black = 0, Yi = β0 + β2Exp + u.

To see whether the average log wage for no experience is thesame for both groups test β2.

To see whether the effect of experience on log wage is thesame for two groups, test β3.

Page 22: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Outline

OLS

Discrete RVs

Panel Data

Instrumental Variables

Regression Discontinuity Design

Internal and External Validity

Time Series

Page 23: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Models for Binary Dependent Variables

Linear Probability Model

Nonlinear Probability Model

ProbitLogitOrdered Probit

The main idea of the model with a binary dependent variableis to interpret the population regression as the probability ofsuccess given regressors.

Page 24: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Linear Probability Model (LPM)

Yi = β0 + β1X1i + · · ·βkXki + ui

This is a probability model. β1 tells you the change in theprobability that Y = 1 for a unit change in X1 holding otherregressors constant.

The predicted value from the regression is the predictedprobability that Y = 1 for the given regressor values.

Page 25: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Advantages and Disadvantages of LPM

Advantages:

Simple to estimate and to interpret. Statistical inference iseasy.One unit increase in X increases probability by 100β1

percentage point.

Disadvantages:

Predicted values can be less than 0 or greater than 1.Can be solved by using nonlinear models.

Page 26: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Probit Regression Model

Probit regression models the probability that Y = 1 using theCDF of normal distribution.

E (Yi |X ) = Pr(Yi = 1|X ) = Φ(β′X ) = Φ(Z )

Predicted probability of Y = 1 given X calculated by thez-score of z = β′X , and looking up this value in the standardnormal distribution.

β1 measures change in z-score not the change in probability.

Page 27: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Logit Regression Model

Logit using the Logistic function instead of the CDF of thenormal distribution.

E (Yi |X ) = Pr(Yi = 1|X ) = 11+exp(−β′X )

Predicted probability of Y = 1 given X is calculated bycomputing z = β′X and looking up z-value in logisticdistribution table (or computing the formula).

Page 28: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Issues in Probit/Logit Model

The S shape of the curves ensures the probability isadmissible.

We can interpret the sign of the coefficients, but not themagnitudes.

To compute the effect on the probability of Y = 1 holdingother regressors fixed, we must calculated before and afterprobabilities and subtract them.

Page 29: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Ordered Probit Model

Ordered probit model is used when the dependent variableconsists of ordered categories.

Suppose Y ∗i = β′X + ui and ui ∼ N (0, 1).

Pr(Yi = 1|X ) = Pr(Y ∗i ≤ cutoff1) = Pr(β′X + ui ≤cutoff1) = Φ(cutoff1 − β′X )Pr(Yi = 2|X ) = Pr(cutoff1 < Y ∗i ≤ cutoff2) =Φ(cutoff2 − β′X )− Φ(cuttoff1 − β′X )Pr(Yi = 3|X ) = Pr(cutoff2 < Y ∗i ) = 1− Φ(cutoff2 − β′X ).

To find the effect of change, you again need to work outbefore and after probabilities.

Page 30: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Outline

OLS

Discrete RVs

Panel Data

Instrumental Variables

Regression Discontinuity Design

Internal and External Validity

Time Series

Page 31: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Types of Data

Panel Data: N different entities are observed at T differenttime periods. If the N entities are the same for each period, itis called longitudinal data.

Balanced Panel: All variables are observed for each entity andtime period.Unbalanced Panel: There are missing variables or time periodsfor some entities.

Cross-sectional Data: N different entities (no time).

Time Series Data: Few entities observed over time.

Ultimately, what you have depends on how you are doing yourasymptotics.

Page 32: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Panel Data

Since each entity is observed multiple times, we can use fixedeffects (dummies) to get rid of the OVB that result fromomitted variables that are invariant within an entity or withina time period (let’s say business cycles or manager talent forstudying firms).

Entity fixed effects control for omitted variables that areconstant within the entity and do not vary over time.

gender, race, cultural characteristics of individuals.

Time fixed effects control for omitted variables that areconstant across entities but vary over time

national level anti-crime policy or national safety standardseach year.

Page 33: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Fixed Effects Regression Model

Yit = β1X1it + · · ·+ βkXkit +N∑n

γnDn +T∑t

δtPt + uit .

Xkit is the kth variable for individual i at time t.

Dn is a dummy for the nth entity

Pt is a dummy for the tth time period.

Page 34: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Important Special Case when T = 2

Regression with entity FE:Yit = αi + β1Xit + uit , for t = 1, 2.

Change regression for entity FE regression:Yi2 − Y i1 = β1(Xi2 − Xi1) + (ui2 − ui1).

Regression with entity and time FE:Yit = αi + β1Xit + δt + uit .

Change regression for entity FE and time FE regression:Yi2 − Yi1 = δ + β1(Xi2 − Xi1) + (ui2 − ui1).

Page 35: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Difference-in-Differences Estimator

Yit = κ+ αTreatmentit + βAfterit + γ(Treatmentit ∗ Afterit) + uit .

Treatment = 1 for treatment group, 0 for control.

After = 1 after program, 0 before.

For treatment group:

After the program: Y = κ+ α + β + γ.Before the program: Y = κ+ α.The effect of the program: After - before = β + γ.

For control group:

After the program: Y = κ+ β.Before the program: Y = κ.The effect of the program: After - before = β.

Difference-in-Differences estimator: β + γ − β = γ. Gives theeffect of the program (as long as uit is exogenous).

Page 36: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Example of Diff-in-Diff

Imagine a one-year school program randomly assigned to afraction of kids in a school.

To estimate the effect of the program, we need to comparethe change in the outcomes of kids in the treatment groupwith the change in the outcomes of kids in the control group.

An interaction for time and enrollment gives us this differenceautomatically.

Page 37: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Serial Correlation in Panel Data

If there is a correlation of the error terms from year to ear fora given entity, called serial correlation, conditional on theregressors and entity FE, OLS estimate of β is still unbiased(conditional mean zero still holds).

However, the estimated standard errors will be wrong. weneed Heteroskedasticity-Autocorrelation-Consistent (HAC)standard errors.

Clustered HAC SE is robust to heteroskedasticity and serialcorrelation of the error terms in panel data. It allows theerrors to be correlated within a cluster but not across theclusters. It treats each cluster as being iid.

Page 38: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Outline

OLS

Discrete RVs

Panel Data

Instrumental Variables

Regression Discontinuity Design

Internal and External Validity

Time Series

Page 39: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Endogenous Independent Variables

The OLS assumption of exogeneity, E (u|X ) = 0, is violated ifthere is correlation between X and u. Then, X is said to beendogenous variable.

If the exogeneity assumption is violated, the coefficient of Xin OLS regression is biased and inconsistent. (e.g. effect ofnutrition on schooling)

IV regression helps us get an unbiased and consistentestimator of the causal effect of changes in X on Y .

When should you use IV regression?

.When you believe that X is correlated with error term u (X isendogenous) ANDYou have valid instruments.

Page 40: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

IV regression

Consider the regression Yi = β0 + β1Xi + ui

Suppose E (u|X ) 6= 0; X is endogenous.

IV regression breaks X into two parts by using theinstrumental variable Z

a part that is correlated with ua part that is not correlated with u (this part is correlated withZ ).

By focusing on the variation in X that is not correlated with uusing the help from the instrument Z , it is possible to obtainan unbiased and consistent estimate of β1.

Page 41: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Conditions for a Valid IV

For Z to be a valid instrument, it must satisfy two conditionsInstrument relevance: Corr(Z ,X ) 6= 0

The instrument Z should be correlated with X since we willuse this correlation to take out the part of X , which isuncorrelated with the regression error term.

Instrument exogeneity: Corr(Z , u) = 0

Z must be exogenous. Z should affect Y only through X , notthrough u. In other words, Z has an indirect effect on Ythrough X , but has no direct effect on Y . Z is correlated withX but uncorrelated with any other variables that can affect Y .

Page 42: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Two Stage Least Squares (TSLS)

Suppose we have a model: Yi = β0 + β1Xi + β2Wi + ui

where X is endogenous variable and W is included exogenousvariable.

First stage regression: Xi = π0 + π1Zi + π2Wi + viRegress Xi on Zi and Wi to isolate the part of Xi that isuncorrelated with ui .Compute the predicted values of Xi : Xi = π0 + π1Zi + π2Wi

Now, Xi is uncorrelated with ui by construction.

Page 43: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

TSLS continued

Second stage regression: Yi = β0 + β1Xi + β2Wi + ui

Regress Yi on Wi and Xi using OLS.Because Xi is uncorrelated with ui , all the regressors areexogenous in the second stage regression.The resulting estimator of β1 is the TSLS estimator.With some algebra, we can show that

βTSLS1 =

Cov(X ,Y )

Var(X )=

Cov(Z ,Y )

Cov(Z ,X )=α

δ.

where α is the coefficient of Z in the regression of Y on Z ,and δ is the coefficient of Z in the regression of X on Z .

You cannot get the standard errors this way.

Page 44: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

General IV Regression Model

Y = β0 + β1X1 + · · ·+ βkXk + γ′W + u.

X1, · · · ,Xk : endogenous regressors.

W : exogenous regressors.

Z1, · · · ,Zm: instruments.

Coefficients β are said to be

Exactly identified if m = k .Over-identified if m > k .Under-identified if k < m. In this case, you need moreinstruments to estimate all βs.

Page 45: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Testing the Relevance of Instruments

Step 1: Run the first stage with all Z s and W s.

Step 2: Run joint hypothesis that Z s are insignficant.

Step 3: The instruments are relevant if you can reject the nullof zero. A large F statistic means your instruments arerelevant, otherwise you might have a weak instrumentproblem.

Page 46: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Testing the Exogeneity of Instruments

Use the J-test if the model is overidentified. If instruments areexogenous, they are uncorrelated with ui and alsoapproximately uncorrelated with the residual from TSLSregression. So test this assumption.

Step 1: Run the TSLS regression to find the residuals ui ,

Step 2: Regress the residuals on the Z s and W s.

Step 3: Compute the F-statistic testing that all theinstruments are insignificant in this regression.

Step 4: Compute the J-statistic =no of instruments *F-statistic. This has χ2 distribution with parameter equal tonumber of instruments - number of endogenous variables.

Step 5: If J-statistic < criticalvalue, then we fail to reject thenull and conclude that the instruments are exogenous.

If you are exactly identified, the J-test is exactly zero.

Page 47: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Outline

OLS

Discrete RVs

Panel Data

Instrumental Variables

Regression Discontinuity Design

Internal and External Validity

Time Series

Page 48: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Regression Discontinuity Design

Sharp regression discontinuity: treatment occurs when somevariable (W) crosses a threshold: Xi = 1 if Wi > w0 else,Xi = 0.

Fuzzy regression discontinuity: treatment more likely to occurwhen a variable crosses a threshold.Pr(Xi = 1|Wi > w0) > Pr(Xi = 1|wi ≤ w0).

The approach is then to estimate E (Yi |Wi ≤ c) andE (Yi |Wi > c). So we compare individuals just below the thresholdto those just above the threshold. The idea is that the only thingthat is systematically different for guys close to the cutoff iswhether or not they got the treatment.

Page 49: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

RDD example

Earningsi = β0 + β1test-performance + β2program + ui .

Those with test-performance less than 50 are assigned to specialprogram. So limit the data-set to those around the 50 cut-off andestimate the above regression.

If we don’t take advantage of the discontinuity, say only lookat:

Earningsi = β0 + β2program + ui ,

we have serious OVB problem.

The biggest threat to RDD is usually manipulation.

Page 50: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Fuzzy RDD Example

If instead of assignment, the students were given a voucher toparticipate, then we have a Fuzzy RDD. Then we use cut-off likean instrument:

Stage 1:

ˆProgrami = γ0 + γ1test-performance + γ2voucheri + vi ,

Stage 2:

Earningsi = β0 + β1ˆProgram + β2test-performance + ui .

Page 51: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Outline

OLS

Discrete RVs

Panel Data

Instrumental Variables

Regression Discontinuity Design

Internal and External Validity

Time Series

Page 52: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Internal and External Valdity

Threats to internal validity:OVB

Attenuation Bias, Sample Selection Bias, SimultaneousCausality Bias.

MisspecificationMeasurement Error

Threats to external validity:

Differences in population studied and population of interest.LATE vs. ATE.Difference in setting studied and setting of interest (lab vs.real world).General Equilibrium effects.

Page 53: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Outline

OLS

Discrete RVs

Panel Data

Instrumental Variables

Regression Discontinuity Design

Internal and External Validity

Time Series

Page 54: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Time Series Data

Data for the same entity observed over time. There is oneobservation at one point in time.

When we analyze time series data, we are mainly interested inimpulse(shock)-response relationship. For example, we canexamine the impact of rise in oil price on stock market indexor the impact of monetary policy on GDP.

The purpose in time series study is often to make a goodforecast.

The correlation of a series with its own lagged values is calledautocorrelation (or serial correlation).

Page 55: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Stationarity

Time series Yt is stationary if its distribution does not changeover time; E (Yt) and Var(Yt) is constant over time, and theCov(Yt ,Yt−j) does not depend on t.

Stationarity implies that history is relevant for forecasting thefuture.

If Yt is not stationary, our normal regression theory breaksdown: The t-statistics dont have standard normaldistributions even in a large sample, so we cant checksignificance of the coefficients in the usual way.

If data is not stationary, we can transform it usually by takingthe first differences to make it stationary before estimation.

Page 56: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Forecasting Models (1)

Autoregressive Model (AR): The pth-order autoregression,AR(p), is a linear regression in which Yt is regressed on itsfirst p lagged values:

Yt = β0 + β1Yt−1 + β2Yt−2 + · · ·βpYt−p + ut .

Assumption 1: E (ut |Yt−1,Yt−2, . . .) = 0: The error terms areserially uncorrelated.

Assumption 2: Yt needs to be stationary.

The best forecast of Yt based on its entire history depends ononly the most recent p past values.

The coefficients do not have a causal interpretation.

Page 57: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Forecasting Models (2)

Autoregressive Distributed Lag (ADL) Model: Theautoregressive distributed lag model, ADL(p,r), is a linearregression in which Yt is regressed on p lags of Y and r lagsof X .

Assumption 1: E (ut |Yt−1,Yt−2, . . . ,Xt−1,Xt−2, . . .) = 0:The error terms are serially uncorrelated.

Assumption 2: (Yt ,Xt) is stationary.

The best forecast of Yt based on its entire history depends ononly the most recent p past values of Y and r lags of X .

The coefficients do not have a causal interpretation.

Page 58: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Model Selection

Tradeoff: If including too few lags, the coefficients could bebiased. If adding too many lags, forecast errors could be toolarge.

When we decide the optimal length of lag (p), use InformationCriterion: BIC or AIC. These are increasing in fit but penalizefor complexity.

Page 59: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Dynamic Causal Effects

Dynamic Causal Effect: effect of a change in X on Y overtime. A shock to Xt−2 affects Yt directly and indirectlythrough Xt−1.

The Distributed Lag Model:

Yt = β0 + β1Xt + β2Xt−1 + · · ·+ βr+1Xt−r + ut .

β1 = impact of a change in contemporaneous X holding pastX constant.β1 + β2 = cumulative effect of a change in Xt−2

And so on.

Need E (ut |Xt ,Xt−1, . . .) = 0 (exogeneity) orE (ut | . . . ,Xt+1,Xt ,Xt−1, . . .) = 0 (strict exogeneity).

Page 60: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Serial Correlation and HAC SE

When ut is serially correlated, OLS coefficients are consistent,but the usual SE without correcting for serial correlation iswrong. So t-statistic based on this SE is also wrong.

In panel data, we use clustered HAC SE to correct for serialcorrelation. It allows the errors to be correlated within acluster but not across the clusters. This approach requiresmany entities. Time series has few entities and many timeperiods so this doesn’t work.

In time series data, the number of entities is small, soclustering is not available. Instead, we use Newey-West HACSE, which estimates correlations between lagged values intime series

Page 61: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Newey-West HAC SE

Too little lags: some of the autocorrelation that might beimportant for estimation of variances could be missing fromthe regression, so the estimator could be biased.

Too many lags: there could be a large estimation error.

The rule of thumb to decide how many lags we will have toestimate is to use the truncation parameter m (number oflags) to employ Newey-West HAC SE: m = 0.75 ∗T 1/3, whereT is the number of observations (or the number of periods).

In AR(p) model or ADL(p,q) model, the error terms areserially uncorrelated if we include enough lags. Thus, no needto use Newey-West HAC SE if the model includes the optimalnumber of lags. In DL model, however, serial correlation isunavoidable and Newey-West HAC SE is preferred.

Page 62: Econometrics: Honor's Exam Review SessionEconometrics: Honor’s Exam Review Session David Rezza Baqaee baqaee@fas.harvard.edu April 3, 2014. OLSDiscrete RVsPanel DataInstrumental

OLS Discrete RVs Panel Data Instrumental Variables Regression Discontinuity Design Internal and External Validity Time Series

Good luck!