Hi everyone! I am looking for some brainstorming help for create a DID program in Stata for this assignment I have in an econometrics class. Here is the question:
1 Difference-in-Differences Monte Carlo
Replicate a figure similar to the one on slide 24 of the difference-in-differences lecture.
Take the following into account for your Monte Carlo DGP
Use a sample size of 10,000 in your experiment
For each rejection frequency you calculate, perform 1000 replications
Make the 50 groups in the experiments proportional to current US state populations
Divide the 10,000 observations equally across 10 years, 1 through 10
Calculate a rejection frequency for 1 treated state, 2 treated states, . . . , 49 treated states
For each replication pick the year in which treatment starts at random between year 4 and 7. Within
a replication, all treated states are treated at the same time.
There is no effect of these treatments, so the null is false.
With this DGP setup, complete the following:
1. For 1 treated state, 2 treated states, . . . , 49 treated states, calculate cluster robust rejection frequencies.
That is estimate a TWFE DiD model, and test the null that the coefficient on the DiD term is zero.
2. Create a figure, like in the slides, but with choosing the treated states in random order.
3. Use the figure to assess at what number of treated states is cluster robust variance estimator most
reliable?
I'm struggling with the DGP(Data Generating Process) setup within Stata. If anyone has suggestions, specifically for the loops required.
1 Difference-in-Differences Monte Carlo
Replicate a figure similar to the one on slide 24 of the difference-in-differences lecture.
Take the following into account for your Monte Carlo DGP
Use a sample size of 10,000 in your experiment
For each rejection frequency you calculate, perform 1000 replications
Make the 50 groups in the experiments proportional to current US state populations
Divide the 10,000 observations equally across 10 years, 1 through 10
Calculate a rejection frequency for 1 treated state, 2 treated states, . . . , 49 treated states
For each replication pick the year in which treatment starts at random between year 4 and 7. Within
a replication, all treated states are treated at the same time.
There is no effect of these treatments, so the null is false.
With this DGP setup, complete the following:
1. For 1 treated state, 2 treated states, . . . , 49 treated states, calculate cluster robust rejection frequencies.
That is estimate a TWFE DiD model, and test the null that the coefficient on the DiD term is zero.
2. Create a figure, like in the slides, but with choosing the treated states in random order.
3. Use the figure to assess at what number of treated states is cluster robust variance estimator most
reliable?
I'm struggling with the DGP(Data Generating Process) setup within Stata. If anyone has suggestions, specifically for the loops required.
Comment