Hello,
I am new to the forums but have read some posts on the forums which have helped me. So thank you for your previous help.
I am working on a dataset of job-month records, and my panel data is organized by job-year-month-company-job performance.
I have a shock during this period. So I calculated a variable called gap to denote the month difference from the current month to the shock month, from -5 to 5.
Now I want to plot the parallel trend graph to see if it holds the parallel trend assumption. I used two-way fixed effects of company and year month.
I used the following code:
However, all my time dummies, from -5 to 5, are omitted.
I also tried to estimate the coefficient for DID using the following codes:
The did variable is omitted.
Is there anything I did wrong? What is the problem here?
Best,
Tong
I am new to the forums but have read some posts on the forums which have helped me. So thank you for your previous help.
I am working on a dataset of job-month records, and my panel data is organized by job-year-month-company-job performance.
I have a shock during this period. So I calculated a variable called gap to denote the month difference from the current month to the shock month, from -5 to 5.
Now I want to plot the parallel trend graph to see if it holds the parallel trend assumption. I used two-way fixed effects of company and year month.
I used the following code:
Code:
eventdd job_performance , timevar(gap) method (hdfe, absorb(company year month ) vce(cluster company)) accum leads(5) lags(5) baseline(-1) noline coef_op(m(oh) c(L) color(black) lcolor(black)) graph_op(ytitle("Parallel Trend") color(black) xline(0, lc(black*0.5) lp(dash)) graphregion(fcolor(white)))
I also tried to estimate the coefficient for DID using the following codes:
Code:
gen post = 0 replace post = 1 if gap > 0 gen treat = 1 if country == "shocked_areas" replace treat = 0 if treat == . reghdfe job_performance did $controllist, absorb(company year month) vce(cluster company)
Code:
(MWFE estimator converged in 3 iterations) note: did is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
Best,
Tong
Comment