Hello,
I'm having an unusual problem I can't seem to resolve. I'm running three logits and want to present several results as odds ratios rather than coefficients (it's going to a clinical journal). For tables, not problem - esttab works just fine with the `eform' option. But, I also want to graph it using `coefplot' and I'm getting an unusual thing: my odds ratio point estimates are not centered in my 95% confidence intervals for the graph, though they obviously are when calculating the upper and lower bounds of the CI. Does anyone have a suggestion as to why this is happening?
Thanks!
David Bradford
My code is:
local v="opioid";
logit any_exclusion l.any_`v'_dol l2.any_`v'_dol l3.any_`v'_dol $xvars st_*, vce(cluster fips);
estimates store `v'_any_dola;
logit any_exclusion l.any_`v'_dol l2.any_`v'_dol l3.any_`v'_dol $xvars st_* if metro==1, vce(cluster fips);
estimates store `v'_any_dolm;
logit any_exclusion l.any_`v'_dol l2.any_`v'_dol l3.any_`v'_dol $xvars st_* if urban==1, vce(cluster fips);
estimates store `v'_any_dolu;
estimates restore opioid_any_dolm;
estimates store Metro;
estimates restore opioid_any_dolu;
estimates store Urban;
estimates restore opioid_any_dola;
estimates store All;
coefplot (All, mcolor(black) ciopts(lcolor(black) recast(rcap)) ) ||
(Metro, mcolor(black) ciopts(lcolor(black) recast(rcap)) ) ||
(Urban, mcolor(black) ciopts(lcolor(black) recast(rcap)) )
,
keep(L.any_opioid_dol L2.any_opioid_dol L3.any_opioid_dol)
xline(1) levels(95) byopts(row(1)) eform citype(logit) mlabel
ylabel( 1 "Any opioid dollars, lagged one quarter"
2 "Any opioid dollars, lagged two quarters"
3 "Any opioid dollars, lagged three quarters"
, labsize(small))
/*ytitle("Odds Ratio for Any Exclusion", size(small))*/
xtitle("Figure 1: Key odds ratios from logit models predicting any physician HHS exclusion in county and quarter", size(small))
saving("$results/OR for any opioid dollars logits.gph", replace)
;
And the resulting coefplot is:
[ATTACH=CONFIG]temp_13674_1552063792111_760[/ATTACH]
Related Posts with Trouble with coefplot and odds ratios
how to write condition for calculating spells?Hi. I have a dataset with the revenues of firms through time, monthly. For example: Code: date …
Converting SPSS file with 2540 variables and 222539 observations into STATA 15 MPHello All, I am struggling with the conversion of SPSS 25 data file to STATA 15, MP version. I have…
How to test validity of instrument in Eoprobit command with endogenous treatmentI am running following command with treatment t=(1,0): eoprobit y x1 x2, entreat (t=X1 X2 Z1 Z2) Ho…
Error estimating treatment effects synth-runnerHello all, Thanks in advance for your help with this request. I am attempting to run models using th…
Merging datasets not uniquely identifiedHello Statalist, I'm currently trying to to merge two data-sets which contain several matching varia…
Subscribe to:
Post Comments (Atom)
0 Response to Trouble with coefplot and odds ratios
Post a Comment