OPTIONS LS=77 PS=45 PAGENO=1; FILENAME nhanes1 URL "http://www.stat.wmich.edu/naranjo/stat5680/nhanes.txt"; TITLE 'NHANES Data'; DATA one; INFILE nhanes1; INPUT gender $ age race $ 19-37 education $ 38-54 fam_inc poverty weight height bwt sys_bp dias_bp cholest glucose; RUN; DATA two; SET one; IF bwt<25.0 THEN bmi="Normal"; ELSE IF 25.0<=bwt<30.0 THEN bmi="Overweight"; ELSE bmi="Obese"; RUN; PROC PRINT data=two (obs=40); VAR cholest race education age bmi; RUN; PROC GLM; CLASS race education; MODEL cholest=race education; MEANS race education; LSMEANS race education; RUN; PROC GLM; CLASS race education bmi; MODEL cholest=race education bmi age; MEANS race education; LSMEANS race education; RUN; QUIT; ****************************************************************************** NHANES Data 1 13:46 Tuesday, November 28, 2017 Obs cholest race education age bmi 1 201 Black Less than HS 65 Obese 2 228 White More than HS 24 Overwe 3 214 Mexican-American Less than HS 34 Normal 4 171 White HS incl GED 18 Normal 5 213 Other Hispanic Less than HS 66 Overwe 6 173 White More than HS 28 Normal 7 243 Mexican-American Less than HS 32 Obese 8 141 White Less than HS 17 Normal 9 146 Mexican-American Less than HS 78 Normal 10 200 Mexican-American Less than HS 19 Obese 11 113 White More than HS 41 Overwe 12 190 White More than HS 40 Obese 13 234 White More than HS 74 Overwe 14 167 White More than HS 57 Obese 15 . White Less than HS 14 Normal 16 219 White More than HS 27 Normal 17 136 White HS incl GED 46 Obese 18 231 White HS incl GED 37 Obese 19 231 White HS incl GED 51 Overwe 20 228 Black Less than HS 78 Normal 21 156 Black More than HS 47 Obese 22 162 White HS incl GED 72 Overwe 23 271 White HS incl GED 46 Overwe 24 264 White HS incl GED 82 Obese 25 171 White More than HS 22 Normal 26 123 Mexican-American Less than HS 19 Normal 27 151 White Less than HS 83 Normal 28 134 Mexican-American Less than HS 15 Normal 29 155 Black Less than HS 13 Normal 30 148 Mexican-American HS incl GED 18 Normal 31 185 White More than HS 42 Overwe 32 191 White More than HS 30 Obese 33 212 Mexican-American Less than HS 22 Obese 34 177 White Less than HS 75 Obese 35 145 Mexican-American Less than HS 19 Normal 36 150 Mexican-American Less than HS 14 Normal 37 222 White More than HS 33 Normal 38 198 White HS incl GED 27 Overwe 39 233 White Less than HS 14 Normal 40 185 Black Less than HS 45 Normal NHANES Data 2 13:46 Tuesday, November 28, 2017 The GLM Procedure Class Level Information Class Levels Values race 5 Black Mexican-American Other (incl multi) Other Hispanic White education 3 HS incl GED Less than HS More than HS Number of Observations Read 200 Number of Observations Used 186 NHANES Data 3 13:46 Tuesday, November 28, 2017 The GLM Procedure Dependent Variable: cholest Sum of Source DF Squares Mean Square F Value Pr > F Model 6 36347.8343 6057.9724 3.32 0.0040 Error 179 326922.0151 1826.3800 Corrected Total 185 363269.8495 R-Square Coeff Var Root MSE cholest Mean 0.100057 22.19379 42.73617 192.5591 Source DF Type I SS Mean Square F Value Pr > F race 4 9557.78370 2389.44592 1.31 0.2687 education 2 26790.05065 13395.02533 7.33 0.0009 Source DF Type III SS Mean Square F Value Pr > F race 4 11679.41154 2919.85289 1.60 0.1766 education 2 26790.05065 13395.02533 7.33 0.0009 NHANES Data 4 13:46 Tuesday, November 28, 2017 The GLM Procedure Level of -----------cholest----------- race N Mean Std Dev Black 42 192.071429 53.5384033 Mexican-American 40 184.925000 36.5586199 Other (incl multi) 2 228.000000 35.3553391 Other Hispanic 3 231.333333 84.0138877 White 99 193.959596 41.4900822 Level of -----------cholest----------- education N Mean Std Dev HS incl GED 42 195.523810 44.7977777 Less than HS 76 179.434211 40.6485213 More than HS 68 205.397059 44.4532757 NHANES Data 5 13:46 Tuesday, November 28, 2017 The GLM Procedure Least Squares Means cholest race LSMEAN Black 194.805793 Mexican-American 194.229797 Other (incl multi) 229.877244 Other Hispanic 247.842066 White 190.821926 cholest education LSMEAN HS incl GED 215.269854 Less than HS 195.006632 More than HS 224.269610 NHANES Data 6 13:46 Tuesday, November 28, 2017 The GLM Procedure Class Level Information Class Levels Values race 5 Black Mexican-American Other (incl multi) Other Hispanic White education 3 HS incl GED Less than HS More than HS bmi 3 Normal Obese Overwe Number of Observations Read 200 Number of Observations Used 186 NHANES Data 7 13:46 Tuesday, November 28, 2017 The GLM Procedure Dependent Variable: cholest Sum of Source DF Squares Mean Square F Value Pr > F Model 9 73817.2270 8201.9141 4.99 <.0001 Error 176 289452.6225 1644.6172 Corrected Total 185 363269.8495 R-Square Coeff Var Root MSE cholest Mean 0.203202 21.06048 40.55388 192.5591 Source DF Type I SS Mean Square F Value Pr > F race 4 9557.78370 2389.44592 1.45 0.2186 education 2 26790.05065 13395.02533 8.14 0.0004 bmi 2 15232.45062 7616.22531 4.63 0.0110 age 1 22236.94199 22236.94199 13.52 0.0003 Source DF Type III SS Mean Square F Value Pr > F race 4 12148.30396 3037.07599 1.85 0.1220 education 2 14707.81831 7353.90915 4.47 0.0128 bmi 2 6507.82710 3253.91355 1.98 0.1413 age 1 22236.94199 22236.94199 13.52 0.0003 NHANES Data 8 13:46 Tuesday, November 28, 2017 The GLM Procedure Level of ---------cholest--------- -----------age----------- race N Mean Std Dev Mean Std Dev Black 42 192.071429 53.5384033 34.2142857 19.0807472 Mexican-American 40 184.925000 36.5586199 35.0250000 21.8273969 Other (incl multi) 2 228.000000 35.3553391 33.0000000 25.4558441 Other Hispanic 3 231.333333 84.0138877 40.3333333 24.5831921 White 99 193.959596 41.4900822 43.9696970 22.1481351 Level of ----------cholest---------- ------------age------------ education N Mean Std Dev Mean Std Dev HS incl GED 42 195.523810 44.7977777 46.6904762 21.5819347 Less than HS 76 179.434211 40.6485213 32.2368421 23.4326658 More than HS 68 205.397059 44.4532757 43.6323529 17.2149747 NHANES Data 9 13:46 Tuesday, November 28, 2017 The GLM Procedure Least Squares Means cholest race LSMEAN Black 198.352163 Mexican-American 196.398001 Other (incl multi) 239.717891 Other Hispanic 242.845399 White 190.923441 cholest education LSMEAN HS incl GED 214.596380 Less than HS 201.767305 More than HS 224.578452