/* Reproduce Figure on p. 53 */ #delimit ; graph twoway (lfit sbp age, yaxis(1 2) xaxis(1 2)) (lfit sbp age if sbp <200, pstyle(p5) lpattern(dash)) (scatter sbp age, msymbol(O) pstyle(p2) mlwidth(medium)), title("Figure 5-8: Best fitting straight line of age and systolic blood pressure", size(medium)) subtitle(" ") ytitle("Systolic blood pressure") ylabel(100(20)220) ytick(100(10)220) ylabel(100(20)220, axis(2) nolabels noticks) xlabel(, axis(1) grid) xlabel(, axis(2) nolabel noticks) xtitle("", axis(2)) xtick(20(5)70) text(224 17.2 "Y") text(100 72 "X") text(168 31 "Y=98.71+0.98X+e", placement(east)) text(120 45 "Y=97.08+0.95X+e", placement(east)) note("Kleinbaum et al., p. 53") aspectratio(1) plotregion(margin(zero)) name(F58, replace) ; #delimit cr