Hi,
I'm using xthdidiregress twfe in Stata18 for a staggered diff in diff. I want to visualize the results and they're supposed to look something like this (different example from the Stata manual):

But instead, my results only have the right hand part, the posttreatment, and lack any information in the pretreatment part (sorry for not showing it, but I can't manage to upload the picture).
I guess there needs to be something wrong with the control group?
Here's what I run:
xthdidregress twfe (growth log_population log_rainfall dist_primalcity log_lights1992) (treated), group(identifier) controlgroup(notyet)
estat atetplot
The dataset is in a panel form (each observation is a unit-year). The "treated" variable is equal to one for treated units starting from the year of the treatment. The first threshold is 2001 and I only have data from 2000, so that could be an issue; the other thresholds are like 2004 2008 2014 and so on, and the dataset is up to 2020. When running the model, Stata says that the never treated and the not yet treated groups are identical (maybe this is relevant?).
Here is some context: it is a regression of growth in cities next to country borders vs cities in the core, after a policy is implemented. The "treated" variable is equal to one only for cities that are along those borders where the policy occurs, at the years when it occurs; I don't distinguish cities along the border and in the core in any other way in the regression (I don't know if this is relevant).
The rest of the results look sensible: I have significant effects in certain years and not significant in others; Stata says that the panel is balanced and the estat ptrends test says Prob>F = 0.0000 (how do I interpret this, by the way?)
Do you have any idea why the plot doesn't show anything in the pretreatment? Does the setup look obviously wrong for some reason?
Thank you very much
I'm using xthdidiregress twfe in Stata18 for a staggered diff in diff. I want to visualize the results and they're supposed to look something like this (different example from the Stata manual):
But instead, my results only have the right hand part, the posttreatment, and lack any information in the pretreatment part (sorry for not showing it, but I can't manage to upload the picture).
I guess there needs to be something wrong with the control group?
Here's what I run:
xthdidregress twfe (growth log_population log_rainfall dist_primalcity log_lights1992) (treated), group(identifier) controlgroup(notyet)
estat atetplot
The dataset is in a panel form (each observation is a unit-year). The "treated" variable is equal to one for treated units starting from the year of the treatment. The first threshold is 2001 and I only have data from 2000, so that could be an issue; the other thresholds are like 2004 2008 2014 and so on, and the dataset is up to 2020. When running the model, Stata says that the never treated and the not yet treated groups are identical (maybe this is relevant?).
Here is some context: it is a regression of growth in cities next to country borders vs cities in the core, after a policy is implemented. The "treated" variable is equal to one only for cities that are along those borders where the policy occurs, at the years when it occurs; I don't distinguish cities along the border and in the core in any other way in the regression (I don't know if this is relevant).
The rest of the results look sensible: I have significant effects in certain years and not significant in others; Stata says that the panel is balanced and the estat ptrends test says Prob>F = 0.0000 (how do I interpret this, by the way?)
Do you have any idea why the plot doesn't show anything in the pretreatment? Does the setup look obviously wrong for some reason?
Thank you very much
Comment