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
Graph bar with Mean and Standard DeviationHi all, Below is an example of my dataset. I want to make two graphs one for the variable area and …
Generating Disease CombinationsHi all I want help in generating all the possible combinations using 20 variables(diseases) in STATA…
Assigning set of values/names to every 1-10 observationHello, I need to assign a set of names in one particular order to the first 10 observations. I want …
Examining -Matchit- options for improving matches based on types of string variablesI am wondering if anyone has seen any kind of examination of the various matching methods available …
Synthetic matching with Pre-Intervention Outcomes ONLYHi, I want to compare the treatment effect on the patent quantity produced by treatment and control…
Subscribe to:
Post Comments (Atom)
0 Response to Trouble with coefplot and odds ratios
Post a Comment