Dear Statalisters:
I ran a gsem command and tried to get average marginal effects (AME). The issue is how combine two options in the margins command. The gsem command is as follows:
. gsem (y1 <- i.v1 i.v2 i.v3 1.v4 agey, probit ///
(y2 <- i.v1 i.v2 i.v3 agey, probit)
To calculate AME, the “predict(fixed)” has to be in the command (or an error message will appear). Thus,
. margins, dydx(*) predict(fixed)
However, the result is for equation (y1). To get the result for equation (y2), Stata manual indicates that an option “predict(equation(y2))” is needed but I cannot to get “predict(fixed)” to work at the same time. The question is how to make the two option work together in margins command.
I would greatly appreciate any advice.
Thanks
T.Y.
I ran a gsem command and tried to get average marginal effects (AME). The issue is how combine two options in the margins command. The gsem command is as follows:
. gsem (y1 <- i.v1 i.v2 i.v3 1.v4 agey, probit ///
(y2 <- i.v1 i.v2 i.v3 agey, probit)
To calculate AME, the “predict(fixed)” has to be in the command (or an error message will appear). Thus,
. margins, dydx(*) predict(fixed)
However, the result is for equation (y1). To get the result for equation (y2), Stata manual indicates that an option “predict(equation(y2))” is needed but I cannot to get “predict(fixed)” to work at the same time. The question is how to make the two option work together in margins command.
I would greatly appreciate any advice.
Thanks
T.Y.
Comment