Assignment 2
Submission Rules:
Provide your answers in a PDF document generated by RMarkdown. For each answer, provide the R code,
the R output, and your comments on the output.
Comment each line of your R code as well. Give thorough explanations throughout, and sufficient math-
ematical descriptions and justifications whenever necessary.
The only allowed R packages are: AER and dagitty. If a non-allowed package is used, the question where it
is used will not get any marks.
If materials from outside the course are used, then appropriate referencing and full justification should be
provided. The reference(s) can take the form of a scientific monograph or a research article (with page
numbers as well), but cannot be a chatGPT (or any other chatbot) output.
The submission cannot be more than 12 pages long.
All R code should be visible, so echo=TRUE should be used when writing R code chunks in the RMarkdwon file.
Exercise 1. The effectiveness of a job training program in reducing unemployment is evaluated
through a randomized control trial where ten thousand participants are randomly allocated
into two groups, a training group and a control group. Some participants in the training group
dropped before the training program started, and members of of the control group were not
allowed to join the training program. At the end of the program, all the participants in the
training group completed their training. The following dataset was collected a year after the
training was completed in order to evaluate the policy:
X: 1 if a participant was selected to take the training and 0 otherwise.
Y : 1 if a participant undertook the training and 0 otherwise.
Z: 1 if a participant found a job a year later and 0 otherwise.
The data collected was as follows
X
Y
Z
Total
0
0
0
4081
1
0
0
762
1
1
0
804
0
0
1
983
1
0
1
207
1
1
1
3163
1. When looking at the data, one policymaker arrives at the conclusion that the probability
of compliance is around 90.31%, and another policymaker arrived at the conclusion
that it is around 80.37%. Are there mistakes in the justifications or the computations
behind either number?
2. Compute estimates of the intention to treat and the complier average causal effect
(LATE).
3. Compute a 95% confidence interval for the complier average causal effect.
1Exercise 2. Consider the dataset DoctorVisits of the AER package. We are interested in
determining whether private health insurance membership has a causal effect on the number
of doctor visits. The dataset has a total of 12 variables including the two variables mentioned
earlier.
1. Taking 5 variables as controls (age, income, illness, reduced, health), try to repro-
duce the following figure:
If you believe the figure to be impossible to reproduce, explain why that is the case.
2. Do you believe the procedures implemented are justifiable?
Exercise 3. Denote the DAG below as G.
2Assume all variables are continuous with zero expectation.
Part A:
1. Draw the skeleton of G. Make sure to choose the coordinates to be as close to the figure
as possible.
2. Draw the PDAG corresponding to all observationally equivalent DAGs to G. Justify
your answer.
Part B:
3. Compute E[U jdo(Z=z)]. Deduce the marginal treatment effect.
4. Compute E[W jdo(X=x)]. Deduce the marginal treatment effect.
Part C:
5. In this part, assume we only observe X, Y and W. Using the do calculus rules, is it pos-
sible to identify p(Y jdo(X=x))? Draw all subgraphs required to answer the question.
6. Deduce the marginal treatment effect from p(Y jdo(X=x)).
Part D:
7. In this part, assume we only observe X, Y , Z and V . If Z is the treatment and V the
outcome, is it possible to compute the causal effect of Z on V by running a regression
of V on Z? If not, describe how to compute that effect, if at all possible.
3