Dear list,
I'm in the process of creating graphs for a regular report and I'd like to include a note which has the point estimate and 95% confidence intervals from the corresponding logistic regression. I've been able to extract those from the output matrix to store as a scalar. I've then converted those scalars to local macros which display the values as intended outside of a graph, but once inserted into the notes for the bar graph, only the name of the local macro displays in the notes although the rest of the graph displays correctly. I've tried double quotes, no quotes, and a few others which don't seem to work. Any help on getting these values to display properly is much appreciated - an approximation the code I'm working with is below.
clogit x y if b==1, group(group)
scalar point = round(exp(_b[y]), 0.01)
local point point
scalar ll = round(el(r(table),5,1), 0.01)
local ll ll
scalar ul = round(el(r(table),6,1), 0.01)
local ul ul
graph bar (mean) x if b==1, over(y) by(group, ///
compact total ///
title("Example title graph") ///
subtitle("by group") ///
note("OR `local', 95% CI `ul' - `ll' " )) ///
ylabel(0 0.2 "20" .4 "40" .6 "60" .8 "80)
Thanks!
Sam
I'm in the process of creating graphs for a regular report and I'd like to include a note which has the point estimate and 95% confidence intervals from the corresponding logistic regression. I've been able to extract those from the output matrix to store as a scalar. I've then converted those scalars to local macros which display the values as intended outside of a graph, but once inserted into the notes for the bar graph, only the name of the local macro displays in the notes although the rest of the graph displays correctly. I've tried double quotes, no quotes, and a few others which don't seem to work. Any help on getting these values to display properly is much appreciated - an approximation the code I'm working with is below.
clogit x y if b==1, group(group)
scalar point = round(exp(_b[y]), 0.01)
local point point
scalar ll = round(el(r(table),5,1), 0.01)
local ll ll
scalar ul = round(el(r(table),6,1), 0.01)
local ul ul
graph bar (mean) x if b==1, over(y) by(group, ///
compact total ///
title("Example title graph") ///
subtitle("by group") ///
note("OR `local', 95% CI `ul' - `ll' " )) ///
ylabel(0 0.2 "20" .4 "40" .6 "60" .8 "80)
Thanks!
Sam
Comment