/* Chapter 8, Table 8.1, p. 115 */ capture clear input byte wgt byte hgt byte age 64 57 8 71 59 10 53 49 6 67 62 11 55 51 8 58 50 7 77 55 10 57 48 9 56 42 10 51 42 6 76 61 12 68 57 9 end gen int age2=age^2 label variable wgt "Weight (Y)" label variable hgt "Height (X1)" label variable age "Age (X2)" label variable age2 "Age-squared (X3)" /* Chapter 8, 8.7 Numerical Examples, pp. 124-126 */ reg wgt hgt /* Model #1 */ reg wgt age /* Model #2 */ reg wgt age2 /* Model #3 */ reg wgt hgt age /* Model #4 */ reg wgt hgt age2 /* Model #5 */ reg wgt hgt age age2 /* Model #6 */