FILENAME goptions URL "http://192.38.117.59/~linearpredictors/datafiles/goptions.sas"; %include goptions; FILENAME url URL "http://192.38.117.59/~linearpredictors/datafiles/readVitaminD.sas"; %include url; /* All women */ PROC FORMAT; VALUE bmigroupf 0 = "Normal weight" 1 = "Slight over weight" 2 = "Obese"; RUN; DATA women; SET vitamind (WHERE = (category=2)); if bmi > 0 and bmi < 25 then bmigroup = 0; if bmi >= 25 and bmi < 30 then bmigroup = 1; if bmi >= 30 then bmigroup = 2; logvitd=log10(vitd); RUN; title 'NOTE: Slightly deviating results for Poland, see note in program!!!!!'; /****************************************************** The table in the printed book was made on a dataset which was later slightly updated. This updated dataset is used here and therefore the results for Poland is slightly deviating from those of the book ******************************************************/ title2 'unadjusted bmi-comparions'; PROC GLM data=women; CLASS bmigroup; MODEL logvitd = bmigroup; ESTIMATE 'slight over weight vs. normal weight' bmigroup -1 1 0; ESTIMATE 'obese vs. normal weight' bmigroup -1 0 1; run; title2 'unadjusted country-comparions'; PROC GLM data=women; CLASS country; MODEL logvitd = country; ESTIMATE 'Denmark vs. Poland' country 1 0 0 -1; ESTIMATE 'Finland vs. Poland' country 0 1 0 -1; ESTIMATE 'Ireland vs. Poland' country 0 0 1 -1; run; title2 'adjusted comparions'; PROC GLM data=women; CLASS country bmigroup; MODEL logvitd = country bmigroup; ESTIMATE 'slight over weight vs. normal weight' bmigroup -1 1 0; ESTIMATE 'obese vs. normal weight' bmigroup -1 0 1; ESTIMATE 'Denmark vs. Poland' country 1 0 0 -1; ESTIMATE 'Finland vs. Poland' country 0 1 0 -1; ESTIMATE 'Ireland vs. Poland' country 0 0 1 -1; run;