Hello.
I'm using Stata 16 on a Mac.
I'm estimating the following model using an unbalanced panel:
which results in the main effect of treated_n being omitted. I would expect this since I'm using FEs.
Next, I use
which results in the following error:
From what I have read, using an unbalanced panel should not be a problem for my DID specification. However, some units are only in the dataset during post=0. Can this impact the ability of margins to be estimated?
Thank you for your input.
I'm using Stata 16 on a Mac.
I'm estimating the following model using an unbalanced panel:
HTML Code:
xtreg DV i.treated_n##i.post CV, fe vce(cluster gvkey)
Next, I use
HTML Code:
margins, dydx(treated_n) at(post = (0,1))
HTML Code:
Average marginal effects Number of obs = 463 Model VCE : Robust Expression : Linear prediction, predict() dy/dx w.r.t. : 1.treated_n 1._at : post = 0 2._at : post = 1 ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- 0.treated_n | (base outcome) -------------+---------------------------------------------------------------- 1.treated_n | _at | 1 | . (not estimable) 2 | . (not estimable) ------------------------------------------------------------------------------ Note: dy/dx for factor levels is the discrete change from the base level.
Thank you for your input.
Comment