I estimate a system of equations (continous dependent variables) with SUEST and then calculate margins as follows:
sysuse auto, clear
reg weight rep turn trunk
est store we_model
regress price turn trunk
est store ols_model
// Combine the models using suest
suest we_model ols_model
margins, dydx(turn trunk) predict(equation(we_model_mean )) atmeans post
suest we_model ols_model
margins, dydx(turn trunk) predict(equation(ols_model_mean )) atmeans post
Everything works, BUT, once I substitute one of the DEPENDENT VARIABLES for a ordered categorical variable, THE PROCEDURE DOES NOT WORK WITH MARGINS OF THE ORDERED CATEGORICAL VARIABLE.
sysuse auto, clear
ologit rep turn trunk
est store olg_model
regress price turn trunk
est store ols_model
suest olg_model ols_model
margins, dydx(turn trunk) predict(equation(ols_model_mean)) atmeans post
THE MARGINAL EFFECT HERE IS CALCULATED WITH EXPRESSION, SO I DO NOT FIND A CORRECT WAY TO MENTION THE NAME OF THE EQUATION ASSIGNED BY SUEST "olg_model_rep78 "
suest olg_model ols_model
margins, dydx(turn trunk) expression(logit(xb() - _b[/cut1]) - logit(xb() - _b[/cut2]))
HOWEVER THIS WORK IF YOU ONLY HAVE ONE EQUATION WIHT PROBIT
oprobit rep turn trunk
est store o1
margins, dydx(turn) expression(normal(xb() - _b[/cut1]) - normal(xb() - _b[/cut2]) )
COULD ANYONE HELP ME TO IDENTIFY THE MARGINAL EFFECTS AFTER SUEST IN THE SECOND EQUATION BEING A OLOGIT ??
THANKS
sysuse auto, clear
reg weight rep turn trunk
est store we_model
regress price turn trunk
est store ols_model
// Combine the models using suest
suest we_model ols_model
margins, dydx(turn trunk) predict(equation(we_model_mean )) atmeans post
suest we_model ols_model
margins, dydx(turn trunk) predict(equation(ols_model_mean )) atmeans post
Everything works, BUT, once I substitute one of the DEPENDENT VARIABLES for a ordered categorical variable, THE PROCEDURE DOES NOT WORK WITH MARGINS OF THE ORDERED CATEGORICAL VARIABLE.
sysuse auto, clear
ologit rep turn trunk
est store olg_model
regress price turn trunk
est store ols_model
suest olg_model ols_model
margins, dydx(turn trunk) predict(equation(ols_model_mean)) atmeans post
THE MARGINAL EFFECT HERE IS CALCULATED WITH EXPRESSION, SO I DO NOT FIND A CORRECT WAY TO MENTION THE NAME OF THE EQUATION ASSIGNED BY SUEST "olg_model_rep78 "
suest olg_model ols_model
margins, dydx(turn trunk) expression(logit(xb() - _b[/cut1]) - logit(xb() - _b[/cut2]))
HOWEVER THIS WORK IF YOU ONLY HAVE ONE EQUATION WIHT PROBIT
oprobit rep turn trunk
est store o1
margins, dydx(turn) expression(normal(xb() - _b[/cut1]) - normal(xb() - _b[/cut2]) )
COULD ANYONE HELP ME TO IDENTIFY THE MARGINAL EFFECTS AFTER SUEST IN THE SECOND EQUATION BEING A OLOGIT ??
THANKS
Comment