Problem Set 5
EC031-S26
Note: The problems may differ based on the edition of the textbook you have.
Problem 1
ASW 15.1
Problem 2
ASW 15.19
Problem 3
ASW 15.32
Problem 4
ASW 15.33
Applications with Stata
Let’s say you want to plot the scatter plot of \(Y\) and \(X\) in the following model:
\[ Y_i = \beta_0 + \beta_1 X_i + \gamma Z_i + \varepsilon_i \]
where \(Y\) is the dependent variable, \(X\) is the independent variable of interest, and \(Z\) is a control variable.
- Open a do-file and write the following code to simulate the data:
clear all
set obs 100
gen X = rnormal()
gen Z = rnormal()
gen epsilon = rnormal()
gen Y = 1 + 2*X + 3*Z + epsilonEstimate the OLS regression of \(Y\) on \(X\) and \(Z\). What are the estimated coefficients?
Show a scatterplot of \(X\) and \(Y\). What do you observe? Is this the true relationship between \(X\) and \(Y\)?
What, conceptually would you need to do in order to see the true relationship between \(X\) and \(Y\) visually? What relationship or correlation would you need to remove?
In order to get the correct relationship in the scatterplot is to “residualize” or “decompose” out the effect of Z from Y and X. One way to do this is using the Frisch-Waugh-Lovell theorem, which is a way to break up a multiple regression model into two (and then as many as you want) separate regressions.
The method goes as follows:
- Regress X on Z and take the residuals.
- Regress y on Z and take the residuals.
- Regress the residuals from step 2 (y) on the residuals from step 1 (X2)
Using the Frisch-Waugh-Lovell theorem, conduct these steps and show that the coefficient on the residual regression in (3) gives the same coefficient on X as the OLS regression of \(Y\) on \(X\) and \(Z\).
Show the scatterplot of the residuals from the regression of \(Y\) on \(Z\) and the residuals from the regression of \(X\) on \(Z\) with a fitted regression line. What do you observe?