Create an Odds Ratio Graph in Stata

You can create an odds ratio graph by combining a bar graph of point estimates and a ranged spiked cap graph of confidence intervals.

To create this graph in Stata, you will first need to download the parmest command from the SSC:

ssc install parmest

To generate this graph in Stata, use the following commands:

sysuse nlsw88, clear
 
logit union married never_married collgrad south
 
parmest, frame(parm)
frame change parm
encode parm, generate(variable)
 
twoway bar estimate variable, horizontal base(1) xline(1) ylabel(, valuelabel) || rcap min95 max95 variable, horizontal legend(rows(1) order(1 "point estimate" 2 "95% conf. int.") position(6)) xtitle("odds ratio") ytitle("")