### How can I plot a caterpillar plot using odd ratios

Posted:

**Thu Dec 19, 2019 6:22 am**I would like to create a caterpillar plot (serrbar command) after performing a logistic multilevel model (two levels, level 1: patient, level 2: hospital)

I was able to run the caterpillar plot using the coefficient as follows:

xi: runmlwin depv indvars cons, ///

level2(hospital: cons, residuals(u)) level1(case_id:) discrete(distribution(binomial) link(logit) denominator(cons) pql2) nopause

egen pickone_hospital = tag(hospital)

qnorm u0 if pickone_hospital==1, aspectratio(1) scheme(s1mono)

egen u0rank = rank(u0) if pickone_school==1

serrbar u0 u0se u0rank if pickone_hospital==1, scale(1.96) yline(0) scheme(s1mono)

Now I need to run the serrbar using the odd ratio (and not the coefficients) and the 95% CI for the odds ratio.

thank you

I was able to run the caterpillar plot using the coefficient as follows:

xi: runmlwin depv indvars cons, ///

level2(hospital: cons, residuals(u)) level1(case_id:) discrete(distribution(binomial) link(logit) denominator(cons) pql2) nopause

egen pickone_hospital = tag(hospital)

qnorm u0 if pickone_hospital==1, aspectratio(1) scheme(s1mono)

egen u0rank = rank(u0) if pickone_school==1

serrbar u0 u0se u0rank if pickone_hospital==1, scale(1.96) yline(0) scheme(s1mono)

Now I need to run the serrbar using the odd ratio (and not the coefficients) and the 95% CI for the odds ratio.

thank you