Hi everyone! I am trying to plot the odds ratios of multiple multivariate logistic regressions (y1, y2, y3, and y4) in one plot, and I hope someone can help me with that. I’d like to have a plot that looks like the one below where only the odds ratio of the variable of interest (x1) is plotted not the control variables (x2, x3, and x4). I am using Stata 14.2 and very much appreciate your help in advance. 
Here is how my code looks like:
Here is how my code looks like:
Code:
local dichotomies y1 y2 y3 y4 tempfile results capture postutil clear postfile handle str32 outcome_var str6 model float (x1 p lb ub) using `results' foreach d of local dichotomies { logit `d' i.x1 x2 i.x3 i.x4 matrix M = r(table) post handle ("`d'") ("logit") (M[1, 2]) (M[4, 2]) (M[5, 2]) (M[6, 2]) } postclose handle preserve use `results', clear gen odds_ratio = exp(x1) replace lb = exp(lb) replace ub = exp(ub) list, noobs clean export excel using "[…]\odds_ratio.xls", firstrow(variables) replace restore
Comment