Thanks, I am trying to replicate the following code from Paper Template (sas.com) Here are the codes from this page: data forestg;
length SUBGP TEXT $14;
infile datalines delimiter=",";
input SUBGP $ IND N EPCT UPCT RR LCL UCL PVAL TVAR TEXT $ XP YP TID BAND;
datalines;
Age,0,.,.,.,.,.,.,0.004,1, ,.,.,1,.
< 13 Years,1,500,50.0,48.0,1.04,0.87,1.25,.,2, ,.,.,2,.
=> 13 Years,1,520,73.1,57.7,1.27,1.11,1.44,.,3, ,.,.,2,.
Sex,0,.,.,.,.,.,.,0.75,4, ,.,.,1,4
Female,1,500,54.4,49.2,1.11,0.93,1.31,.,5, ,.,.,2,5
Male,1,520,45.8,48.9,0.94,0.78,1.12,.,6, ,.,.,2,6
Ethnicity,0,.,.,.,.,.,.,0.35,7, ,.,.,1,.
Hispanic,1,80,60,46,1.30,0.86,1.98,.,8, ,.,.,2,.
Non-Hispanic,1,940,47.7,51.7,0.92,0.82,1.04,.,9, ,.,.,2,.
Length of Stay,0,.,.,.,.,.,.,0.0001,10, ,.,.,1,10
< 2 Days,1,484,50.4,57.9,0.87,0.74,1.03,.,11, ,.,.,2,11
=> 2 Days,1,536,41.5,57.4,0.72,0.61,0.86,.,12, ,.,.,2,12
Comorbidities,0,.,.,.,.,.,.,0.86,13, ,.,.,1,.
Yes,1,40,33.3,35.9,0.93,0.27,2.25,.,14, ,.,.,2,.
No,1,980,49.6,49.0,1.01,0.89,1.15,.,15, ,.,.,2,.
,.,.,.,.,.,.,.,.,16,Less Risk,0.4,16,2,.
,.,.,.,.,.,.,.,.,16,More Risk,1.8,16,2,.
;
run;
data forestmap2;
input ID $ value textcolor $ textsize textweight $;
datalines;
myid 1 black 7 bold
myid 2 black 5 normal
;
run;
proc sgplot data=forestg noautolegend dattrmap=forestmap2 ;
styleattrs axisextent=data;
refline BAND / lineattrs=(thickness=23 color=palegreen);
scatter x=RR y=TVAR / markerattrs=(symbol=squarefilled color=forestgreen)
xerrorlower=LCL xerrorupper=UCL errorbarattrs=(color=forestgreen);
scatter x=RR y=TVAR / markerattrs=(size=0) x2axis;
refline 1 / axis=x lineattrs=(color=forestgreen);
text x=XP y=TVAR text=TEXT / position=center;
yaxistable SUBGP / location=inside position=left textgroupid=myid textgroup=TID
labelattrs=(size=10 weight=bold) indentweight=IND nomissingchar label="Subgroup";
yaxistable N / location=inside position=left labelattrs=(size=10 weight=bold)
valueattrs=(size=7) nomissingchar label="Count";
yaxistable EPCT / location=inside position=right labelattrs=(size=10 weight=bold)
valueattrs=(size=7) nomissingchar label="Exposed";
yaxistable UPCT / location=inside position=right labelattrs=(size=10 weight=bold)
valueattrs=(size=7) nomissingchar label="Not Exposed";
yaxistable PVAL / location=inside position=right labelattrs=(size=10 weight=bold)
valueattrs=(size=7) nomissingchar label="P-Value";
yaxis reverse display=none colorbands=odd colorbandsattrs=(color=palegreen
transparency=0.5) offsetmin=0;
xaxis display=(nolabel) values=(0 to 2.5 by 0.5);
x2axis label="Risk Ratio" labelattrs=(size=10 weight=bold) display=(noline noticks
novalues);
run; I would like to clip the comorbidity 'Yes' subgroup confidence interval [i.e. 0.27 - 2.25]
... View more