/* Reproduce Figure on p. 60 */ #delimit ; graph twoway (lfitci sbp age, level(90) fintensity(50) stdf color(gs10) yaxis(1 2) xaxis(1 2)) (lfitci sbp age, level(90) fintensity(50)) (lfit sbp age) (scatter sbp age, msymbol(O) pstyle(p2) mlwidth(medium)), title("Figure 5-10: 90% Confidence and prediction bands for age and" " systolic blood pressure", size(medsmall)) subtitle(" ") ytitle("Systolic blood pressure") ylabel(100(20)220) ytick(100(10)220) ylabel(90(20)220, axis(2) nolabels noticks) xlabel(20(10)70, axis(1) grid) xlabel(15 " " 72 " ", axis(2) nolabel noticks) xtitle("", axis(2)) xtick(20(5)70) note("Kleinbaum et al., p. 60") 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") plotregion(margin(zero)) name(F510, replace) ; #delimit cr