Hi Statalist
My question is about how we can get Margins commands to work correctly when the estimation model, which includes interaction terms, does not support factor notation.
Specifically, I understand there are good reasons as to why models such as -xthtaylor- do not support factor notations & I have simply created the interaction terms manually via inter = i.x1 * i.x2 if !missing(x1) & !missing(x2).
However, this poses a difficulty when it comes to using -margins- & -marginsplot-.
I note a related discussion from https://www.statalist.org/forums/for...action-effects. Unfortunately I am not yet skilled enough in Stata programming to confidently implement Daniel's solution in that post. I am therefore wondering if anyone might be aware of user-written commands or the like to address this issue?
Thanks,
Junran
My question is about how we can get Margins commands to work correctly when the estimation model, which includes interaction terms, does not support factor notation.
Specifically, I understand there are good reasons as to why models such as -xthtaylor- do not support factor notations & I have simply created the interaction terms manually via inter = i.x1 * i.x2 if !missing(x1) & !missing(x2).
However, this poses a difficulty when it comes to using -margins- & -marginsplot-.
I note a related discussion from https://www.statalist.org/forums/for...action-effects. Unfortunately I am not yet skilled enough in Stata programming to confidently implement Daniel's solution in that post. I am therefore wondering if anyone might be aware of user-written commands or the like to address this issue?
Thanks,
Junran
Comment