------------------------------------------------------------------------------- log: d:\bill\fall2008\econ30331\bmi1.log log type: text opened on: 26 Sep 2008, 09:52:17 . . * open data set . use bmi1 . . . * describe data set . desc Contains data from bmi1.dta obs: 1,259 vars: 9 26 Sep 2008 09:45 size: 33,993 (98.6% of memory free) ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- age byte %8.0g age in years sex byte %8.0g =1 if male, =2 if female income int %8.0g annual family income educ byte %8.0g years of education srhealth byte %8.0g self report health,1=excel,2=vgood,3=good,4 =fair,5=poor bmi float %9.0g body mass index totalexp long %12.0g total annual expenditures on medical care smoker byte %8.0g dummy variable, =1 if current smoker race float %9.0g =1 if white non-hisp,=2 if black nonhisp,=3 other race,4=hispanic ------------------------------------------------------------------------------- Sorted by: . . . * generate race dummy variables; . gen black=race==2 . gen other_race=race==3 . gen hispanic=race==4 . label var black "=1 of black, non hispanic" . label var other_race "=1 if other race, non hispanic" . label var hispanic "=1 if hispanic" . . . * generate overweight dummy . gen overweight=bmi>=25 . label var overweight "dummy, =1 if overweight" . . * get table of overweight . tab overweight dummy, =1 | if | overweight | Freq. Percent Cum. ------------+----------------------------------- 0 | 377 29.94 29.94 1 | 882 70.06 100.00 ------------+----------------------------------- Total | 1,259 100.00 . . * generate ln(income) . gen incomel=ln(income) . label var incomel "ln of family income" . . * generate male . gen male=sex==2 . label var male "=1 if male, 0 otherwise" . . reg overweight age educ incomel male black hispanic other_race smoker Source | SS df MS Number of obs = 1259 -------------+------------------------------ F( 8, 1250) = 11.78 Model | 18.5118546 8 2.31398183 Prob > F = 0.0000 Residual | 245.597756 1250 .196478205 R-squared = 0.0701 -------------+------------------------------ Adj R-squared = 0.0641 Total | 264.109611 1258 .209944047 Root MSE = .44326 ------------------------------------------------------------------------------ overweight | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .0075824 .0014394 5.27 0.000 .0047585 .0104063 educ | -.0129821 .0043338 -3.00 0.003 -.0214843 -.0044798 incomel | -.0151473 .0379148 -0.40 0.690 -.089531 .0592364 male | -.12196 .0252562 -4.83 0.000 -.1715093 -.0724108 black | .173329 .0364559 4.75 0.000 .1018075 .2448504 hispanic | .1104625 .0338091 3.27 0.001 .0441337 .1767913 other_race | -.0516011 .0513305 -1.01 0.315 -.1523045 .0491022 smoker | -.0178954 .0315521 -0.57 0.571 -.0797963 .0440056 _cons | .7245841 .3746124 1.93 0.053 -.0103544 1.459523 ------------------------------------------------------------------------------ . . end of do-file . exit no; data in memory would be lost r(4); . clear . exit, clear