* Use BWGHT2.dta regress lbwght npvis npvissq summarize npvis if npvis > 21 regress lbwght npvis npvissq mage magesq summarize mage if mage > 30 * Getting the R^2 and SST from the bwght equation regress bwght npvis npvissq mage magesq * R^2_bwght = 0.0192, SST = 593759796 * Now get the predict values of birthweight from the lbwght equation regress lbwght npvis npvissq mage magesq predict lbwght_hat generate bwght_tilda = exp(lbwght_hat + 0.0411052/2) generate SSR_y_tilda = 1764*(bwght - bwght_tilda)^2 summarize SSR_y_tilda * SSR_y_tilda = 5.85e+08 * R^2_y_tilda = 1 - SSR_y_tilda/SSt = 1 - 5.85e+8/593759796 = 0.0147531 * Since the bwght equation had a higher R^2_bwght than the corresponding * R^2_y_tilda implied from the lbwght equation, we go with the bwght specification.