* * Example 4.9 from pp 150-151 * open data bwght.raw data(format=free,org=columns) 1 1388 faminc cigtax cigprice bwght fatheduc motheduc $ parity male white cigs lbwght bwghtlbs packs lfaminc * * The LINREG will automatically drop the data points which have missing values * for motheduc and fatheduc. * linreg bwght # constant cigs parity faminc motheduc fatheduc exclude # motheduc fatheduc * * However, if we want to run the restricted regression, we'll leave out the two * variables which have the missing variables, so the automatic sample selection * will give us the full sample, rather than the limited one. The SMPL option can * be used to select data points based upon some criterion, in this case, the * points where both motheduc and fatheduc are "valid", that is, not missing. * set smpl = %valid(motheduc).and.%valid(fatheduc) linreg(smpl=smpl) bwght # constant cigs parity faminc