/* Reproduce Figure on p. 60 */ set scheme s2color #delimit ; graph twoway (lfitci sbp age, level(90) stdf yaxis(1 2) xaxis(1 2)) (lfitci sbp age, level(90) fcolor(gs10)) (lfit sbp age, lc(black)) (scatter sbp age, msymbol(O) pstyle(p2) mlwidth(medium) mcolor(black)), title("Figure 5-10: 90% Confidence and prediction bands for age and" " systolic blood pressure", size(medsmall) color(black) position(11) span) xtitle("", axis(2)) ytitle("Systolic blood pressure") subtitle(" ") note("Kleinbaum et al., p. 60", span) xlabel(15 " " 72 " ", axis(2) nolabel noticks) xlabel(20(10)70, axis(1) grid glwidth(vvthin) glcolor(gs10)) xtick(20(5)70) ylabel(100(20)220, angle(0) glwidth(vvthin) glcolor(gs10)) ylabel(90(20)220, axis(2) nolabels noticks) ytick(100(10)220) text(170 22 "Upper 90%" "prediction band", size(small) justification(right) placement(e)) text(110 55 "Lower 90%" "prediction band", size(small) justification(left) placement(e)) text(137 20 "90% Confidence" "Bands", size(small) j(left) placement(e)) text(170 60 "Y=98.71 +0.97X") text(225 15 "Y") text(84 76 "X") legend(off) plotregion(margin(zero)) graphregion(color(white)) name(F510, replace) ; #delimit cr