Hi,
I have a problem with Coefplot. I have tried the different answers I have found here from earlier, but I cannot get anything to work. I am using Stata 14.2 if that makes any difference.
I am running a basic DD regression looking like this:
reg AN_OSUB_ treat_lead* treat_0 treat_lag* i.YFE*, cluster(regnr)
Where AN_OSUB is my dependent variable, treat_lead* is 7 leads of my treatment variable, treat_0 is the year of treatment interaction and treat_lag* is 2 lags of the treatment. Lastly i.YFE are my year dummies. I want to plot the leads and lags to visualize the parallel trends test, but I don´t want my year fixed effects to show up in the plot.
I have tried to write *.YFE within the brackets of drop, I've tried not to drop the constant and only drop the year fixed effects but they are still left in the plot.
reg AN_OSUB_ treat_lead* treat_0 treat_lag* i.YFE*, cluster(regnr)
coefplot, drop(YFE*) yline(0) xline(6) vertical
coefplot, drop(_cons, (YFE*)) yline(0) xline(6) vertical
I have also tried to use "keep" instead, but that doesn't work either. Then STATA plots evrything as 0 even if none of the coefficents are zero.
reg AN_OSUB_ treat_lead* treat_0 treat_lag1 i.YFE*, cluster(regnr)
est store _all
coefplot _all, keep(treat*) vertical
Does anyone have a clue what I can do to only plot the treatment, leads and lags?
/Emma
Related Posts with Coefplot, only plotting some of the variables
Boxplots in STATAHello, I am trying to create a boxplot of categorical variables in stata. I have about 6 to 7 variab…
How to mix the obs of two variables?Hello everyone, This is my database. Each org_uuid is matched with a specific investor_uuid. This a…
How to find optimal bandwidth?Hi all, when plotting Code: twoway (lpoly logexptot bin if D==0, degree (1) kernel(epanechnikov))…
Is "no anticipation effect" a must in testing Difference-in-Difference?I am wondering if we "must" test the "no anticipation effect" if the parallel trend assumption is sa…
esttab with the error " in range not allowed" r(101);The code is as following, Why did this error occur, thanks esttab m s, nogap compress replace /// mt…
Subscribe to:
Post Comments (Atom)
0 Response to Coefplot, only plotting some of the variables
Post a Comment