In a recent posting (https://www.statalist.org/forums/forum/general-stata-discussion/general/1632906-recovering-the-estimate-of-an-interaction-term-using-margin), solutions were provided for recovering the estimate (coefficient) of a two-way interaction with two binary variables, using margins (and lincom).
Now, assume that the base category of all zeros is not included in the estimation (there is a real reason for not including cases with all zeros). How do we recover the estimate now that the counterfactual of "all zeros" is not available?
More specifically, using the code below, how do we recover the estimate for "not_smsa" and the estimate for the interaction term "not_smsa#south"?
Thanks in advance!
Ariel
Code:
webuse regsmpl, clear * generate variable to get sum of the interaction variables egen cnt_var = rowtotal( not_smsa south black) * estimate model for only observations with a cnt_var > 0 regress ln_wage i.not_smsa##i.south##i.black if cnt_var > 0 margins not_smsa#south#black, coefl post
0 Response to recovering the estimate of an interaction term using margins when the base level of all zeros is not included
Post a Comment