Hi Statalisters,
I would greatly appreciate it if anyone can help me with the following problem.
I have a panel data and I am trying to run a hybrid model (Allison, 2009) with interactions.
After running the model, I would like to use the "margins" command.
In the following, yit is a dependent variable, x1it, x2it, x3it are time-variant independent variables and zi is time-fixed independent variable.
x1it is a dummy variable, while yit, x2it, x3it and zi are not.
After this, I would like to run the following command.
However, running margins command in this way would not be enough since margins command does not recognize "x1it"s in "dx1it" "dx1itXzi" "mx1itXzi" as the same variable (please correct me if I am wrong).
Do you have any suggestions?
Best,
Tate
Reference
Allison, P. D. (2009). Fixed effects regression models (Vol. 160). SAGE publications.
I would greatly appreciate it if anyone can help me with the following problem.
I have a panel data and I am trying to run a hybrid model (Allison, 2009) with interactions.
After running the model, I would like to use the "margins" command.
In the following, yit is a dependent variable, x1it, x2it, x3it are time-variant independent variables and zi is time-fixed independent variable.
x1it is a dummy variable, while yit, x2it, x3it and zi are not.
Code:
gen x1itXzi =x1it*zi by id, sort: center x1it x2it x3it x1itXzi, prefix(d) mean(m) xtset id time xtreg yit dx1it dx2it dx3it dx1itXzi zi mx1it mx2it mx3it mx1itXzi
Code:
margins x1it, at(zi=(-2 -1 0 1 2)) atmeans
Do you have any suggestions?
Best,
Tate
Reference
Allison, P. D. (2009). Fixed effects regression models (Vol. 160). SAGE publications.
Comment