Home  /  Stata News  /  Vol 30 No 1 (2015 quarter 1)  /  Margins gets even better
Stata Release 14: Available now

Margins gets even better

One of Stata's neatest commands, margins, is difficult to explain. With margins, you can do what-if analyses. What would have been observed if everyone in the data was male? Female? What would have happened if the men in the data had their same characteristics but were relabeled women, and the women had their same characteristics but were relabeled men? If you can think of a counterfactual, potential outcome, comparison, or contrast, margins can do it.

margins is used after fitting a model. margins combines the fitted results, the data, and a little that you type to produce estimates of marginal effects, marginal means, predictive margins, population-averaged effects, and least-squares means and presents the estimates in tables or graphs.

margins now automatically produces multiple results for the multiple outcomes for estimators like multinomial logistic, ordered logistic, and multivariate regression. We wish we had space to show you some graphs.

See how easy this is in Marginal analysis with multiple outcomes.

margins now handles multilevel models and SEM by integrating over unobserved (latent) variables such as the random effect.

Read even more about marginal predictions, means, effects, and more.