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 numbers 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 ******************************************************/ proc tabulate data=women; CLASS country bmigroup; var logvitd; table country,(bmigroup*logvitd)*(mean*(f=8.3) N*(f=5.0)); format country countryf.; format bmigroup bmigroupf.; run;