/* Reproduce Figure on p. 42 */ #delimit ; graph twoway (lfit sbp age, yaxis(1 2) xaxis(1 2)) (scatter sbp age, msymbol(O) mlwidth(medium)), title("Figure 5-1: Scatter diagram 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") note("Kleinbaum et al., p. 42") aspectratio(1) plotregion(margin(zero)) name(F51, replace) ; #delimit cr