7 Comments
Mar 17Liked by scott cunningham

Very cool! I liked that you had ChatGPT answer those questions too, to get a sample response. This can help crafting meaningful exam questions that can show whether learners have worked out their own understanding, or have used other (sneaky) means.

Expand full comment
Mar 17Liked by scott cunningham

So, to be clear - the answers were all correct? The tone of your subsequent commentary suggests as much but forgive me, I'm a stata novice

Expand full comment

Awesome!

I tried to push it a bit further with the CS DiD:

Prompt: I am writing an exam for a causal inference class. Create a question about difference in differences with staggered treatment asking them to analyze and interpret R output from the Callaway and Sant'anna DiD with 5 groups and 10 times event study aggregate effect

Chat GPT Answer:

Sure, here's an example question for your exam:

Suppose you are studying the effect of a policy intervention on employment outcomes across five different regions over the course of ten years. The policy was introduced in a staggered manner, with each region receiving the intervention at a different point in time. You estimate the difference in differences (DiD) with staggered treatment using the Callaway and Sant'anna DiD estimator and obtain the following R output:

Estimate Std. Error t-value Pr(>|t|)

(Intercept) 5.050 0.250 20.200 <0.001 ***

Post 1.120 0.350 3.200 0.002 **

Treat 2.530 0.400 6.325 <0.001 ***

Post:Treat -0.820 0.450 -1.822 0.073 .

Aggregate Effects:

Estimate Std. Error t-value Pr(>|t|)

Agg. Treatment 2.120 0.325 6.525 <0.001 ***

Agg. Post 1.020 0.425 2.400 0.019 *

Agg. Post:Treatment -1.120 0.525 -2.134 0.042 *

(a) What do the coefficients on Post, Treat, and Post:Treat represent in this regression?

(b) How would you interpret the coefficient on Post:Treat? Is it statistically significant at the 5% level?

(c) What do the aggregate effects represent in this regression? How would you interpret the coefficients on Agg. Treatment, Agg. Post, and Agg. Post:Treatment?

(d) What does a statistically significant coefficient on Agg. Post:Treatment indicate about the effect of the policy intervention on employment outcomes across all regions?

Note: You may need to provide additional information about the data and the policy intervention for students to fully answer these questions.

Prompt: (I wasn't happy with that R output)

That is not how the Callaway and Sant'anna Dynamic Effects and Event Studies DiD R output looks like, here is an example

#>

#> Call:

#> aggte(MP = example_attgt, type = "dynamic")

#>

#> Reference: Callaway, Brantly and Pedro H.C. Sant'Anna. "Difference-in-Differences with Multiple Time Periods." Journal of Econometrics, Vol. 225, No. 2, pp. 200-230, 2021. <https://doi.org/10.1016/j.jeconom.2020.12.001>, <https://arxiv.org/abs/1803.09015>

#>

#>

#> Overall summary of ATT's based on event-study/dynamic aggregation:

#> ATT Std. Error [ 95% Conf. Int.]

#> 1.9904 0.0377 1.9165 2.0644 *

#>

#>

#> Dynamic Effects:

#> Event time Estimate Std. Error [95% Simult. Conf. Band]

#> -2 0.0023 0.0672 -0.1784 0.1830

#> -1 0.0105 0.0402 -0.0975 0.1185

#> 0 0.9929 0.0302 0.9118 1.0740 *

#> 1 2.0231 0.0438 1.9053 2.1410 *

#> 2 2.9552 0.0628 2.7863 3.1241 *

#> ---

#> Signif. codes: `*' confidence band does not cover 0

#>

#> Control Group: Never Treated, Anticipation Periods: 0

#> Estimation Method: Doubly Robust

Chat GPT Answer:

I apologize for the confusion, thank you for providing an example of the correct output. Here's an updated question:

Suppose you are studying the effect of a policy intervention on a certain outcome using a difference in differences (DiD) framework with an event-study/dynamic aggregation. You estimate the DiD using the Callaway and Sant'Anna DiD estimator with five groups and ten time periods, and obtain the following R output:

Overall summary of ATT's based on event-study/dynamic aggregation:

ATT Std. Error [ 95% Conf. Int.]

1.9904 0.0377 1.9165 2.0644 *

Dynamic Effects:

Event time Estimate Std. Error [95% Simult. Conf. Band]

-2 0.0023 0.0672 -0.1784 0.1830

-1 0.0105 0.0402 -0.0975 0.1185

0 0.9929 0.0302 0.9118 1.0740 *

1 2.0231 0.0438 1.9053 2.1410 *

2 2.9552 0.0628 2.7863 3.1241 *

(a) What is the overall average treatment effect (ATT) of the policy intervention based on the event-study/dynamic aggregation? Is it statistically significant at the 5% level?

(b) What do the dynamic effects represent in this regression? What is the estimated effect of the policy intervention in the first two time periods (event times -2 and -1)? Is this effect statistically significant at the 5% level?

(c) What is the estimated effect of the policy intervention at the event time 0 (i.e., the time when the policy was introduced)? Is this effect statistically significant at the 5% level?

(d) What is the estimated effect of the policy intervention in the subsequent two time periods (event times 1 and 2)? Are these effects statistically significant at the 5% level?

Note: You may need to provide additional information about the data and the policy intervention for students to fully answer these questions.

Prompt: (Still, I wasn't happy)

Cool, but you just put the same number, make up your own numbers and at least have 5 post treatment time events

Chat GPT answer:

You're right, I apologize for that mistake. Here's an updated version of the question with made-up numbers and 5 post-treatment time events:

Suppose you are studying the effect of a new job training program on wages using a difference in differences (DiD) framework with an event-study/dynamic aggregation. The program was implemented in three treatment groups (A, B, and C) at different times, and you have a control group (D) that was never treated. You have ten years of data with annual observations for each group. You estimate the DiD using the Callaway and Sant'Anna DiD estimator with five post-treatment time events and obtain the following R output:

Overall summary of ATT's based on event-study/dynamic aggregation:

ATT Std. Error [ 95% Conf. Int.]

2.1023 0.0432 2.0173 2.1873 *

Dynamic Effects:

Event time Estimate Std. Error [95% Simult. Conf. Band]

-5 0.0235 0.0541 -0.0825 0.1296

-4 0.0312 0.0429 -0.0524 0.1148

-3 0.0418 0.0386 -0.0328 0.1163

-2 0.1243 0.0551 0.0167 0.2318 *

-1 0.2751 0.0721 0.1334 0.4169 *

0 2.0054 0.1324 1.7477 2.2632 *

1 2.1867 0.1401 1.9118 2.4616 *

2 2.5898 0.1462 2.3007 2.8788 *

3 2.8852 0.1508 2.5804 3.1901 *

4 3.0721 0.1522 2.7727 3.3716 *

(a) What is the overall average treatment effect (ATT) of the job training program based on the event-study/dynamic aggregation? Is it statistically significant at the 5% level?

(b) What do the dynamic effects represent in this regression? What is the estimated effect of the job training program in the first two years after treatment (event times -2 and -1)? Are these effects statistically significant at the 5% level?

(c) What is the estimated effect of the job training program in the year of treatment (event time 0)? Is this effect statistically significant at the 5% level?

(d) What is the estimated effect of the job training program in the subsequent two years after treatment (event times 1 and 2)? Are these effects statistically significant at the 5% level?

Note: You may need to provide additional information about the data and the job training program for students to fully answer these questions.

Prompt:

Awesome! I'll post it in Scott's blog

Chat GPT Answer:

Great! I hope it's helpful for others in the causal inference community. Good luck with your exam!

Closing remarks: "tweak it, change it, go deeper"

Thanks!

Renzo

Expand full comment