Applied Class #5 - Gaussian MTE Model
Introduction
This practical session is based on Heckman, Tobias, & Vytlacil (2001) and Angrist (2004). Throughout this class, we will work with the following model:
Exercises
Write an R function that uses
rmvnorm()
from themvtnorm
package to simulate iid draws of from the multivariate normal distribution described above, fixing , , , and . Your function should take five arguments—n
,rho0
,rho1
,gamma0
, andgamma1
—and return a data frame with named columnsY0
,Y1
,V
,Z
,D
, andY
. In real life we can only observe but fortunately for us, simulations aren’t real life! In this example there is no need to store since they coincide with when .Use your function from the preceding part to make and store 1,000,000 simulation draws with
, , and . Use your simulation draws to calculate the LATE, TOT, and TUT at these parameter values.In the previous exercise you used simulation to approximate the values of the LATE, TOT, and TUT at particular parameter values. Use the following formulas from the lecture slides to check your simulations against the analytical formulas that apply in the case where
and . Recall that we use the shorthand .Consult Section 2.1 of Angrist (2004). Angrist’s notation is slightly different from ours: what he calls
we call , what he calls we call , and what he calls TT we call TOT. Other than that, everything is the same. Figure 1 of this paper plots the TOT and LATE over a range of values for . Use the formulas from the previous question to reproduce panel (a) of this figure. Add in the TUT effect for good measure if you’re feeling ambitious! You’ll need to read a few short extracts of the paper to determine how to set the parameters and when making your plot.In this problem you will apply the Heckman two-step estimator to the simulated values of
from question 2 above to estimate the parameters , , and . In the simulation we know that , , and , so you’ll check the estimator against these values. Follow these steps:- Use the simulated values of
to estimate . Call your estimates . Check that your estimates match the true values that you used to generate the data: and . - Define the shorthand
. Add a column calledlambda
to the dataframe containing your simulated values of that evaluates the function at the observed values of .
- Define the shorthand
. Add a column calledkappa
to the dataframe containing your simulated values of that evaluates the function and at the observed values of .
- For the subset of observations with
, run a regression of onlambda
and a constant. The intercept should be approximately equal to and the slope approximately equal to . - For the subset of observations with
, run a regression of onkappa
and a constant. The intercept should be approximately equal to and the slope approximately equal to .
- Use the simulated values of