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
Panel data difference-in-difference with different treatment timingHi all, I'm trying to study whether the decline in birth rates had an impact on GDP on a national l…
save results from "test" (wald test) command and combine later with others to create outputI am running several test commands in a row and I would like to save these results and combine them …
Combining two datasets on two variables.Hello, I have one dataset (called Natural Disaster) with three variables: Year, CountryCode, and Tot…
Merging problemHi statalist, I have shown a sample of my dataset below. I want to make a merging with the other da…
Comparing regressions using dummy variable as categoryHi guys, I'd like to test whether monthly log-return volatility is stronger during recessionary per…
Subscribe to:
Post Comments (Atom)
0 Response to Trouble with coefplot and odds ratios
Post a Comment