Plotting univariate and multivariate regression results in Stata

infoart.ca
1 min readNov 9, 2023

--

Logistic regression models help us understand how predictor variables influence outcomes. As researchers and data enthusiasts, nothing cheers us quite like plotting the results of regression analyses. Unfortunately, there is no straightforward way to plot the odds ratios using popular statistical implications including R and Python.

Luckily, the Stata community has this covered! Stata’s mulogitpackage is a hidden gem that enriches this process by a strikingly simple command.

in addition, mulogitgenerates both multivariate and univariate odds ratio plot with corresponding 95% confidence intervals for variables specified in a varlist. This package is therefore an excellent choice for researchers who need to analyze and present the results of logistic regression models.

Here is a quick example using the auto dataset in Stata 18.

ssc install mulogit

sysuse auto
mulogit foreign mpg trunk weight length turn displacement

N.B. Right now, the package cannot handle categorical variables as such, i.e. it treats categorical variables as continuous. So we have to be aware of this limitation and interpret the results carefully.

--

--

infoart.ca
infoart.ca

Written by infoart.ca

Center for Social Capital & Environmental Research | Posts by Bishwajit Ghose, BI consultant and lecturer at the University of Ottawa

No responses yet