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; /* Scatter plot of Vitamin D against BMI with smoother */ DATA irishwomen; SET vitamind (WHERE = (country=4 and category=2)); PROC LOESS DATA = irishwomen; ODS OUTPUT OUTPUTSTATISTICS = results; MODEL vitd = bmi /SMOOTH = 0.70; /* fitting lines using 70% nearest points */ RUN; PROC SORT DATA = results; BY bmi; RUN; PROC GPLOT UNIFORM DATA = results; PLOT (DepVar Pred)*bmi/ OVERLAY HAXIS=AXIS1 VAXIS=AXIS2; AXIS1 OFFSET=(0,0) MINOR=NONE /* ORDER=(10 TO 40 BY 10) */ LABEL=('BMI'); AXIS2 OFFSET=(0,0) MINOR=NONE /* ORDER=(0 TO 120 BY 20) */ LABEL=(A=90 R=0 'Vitamin D'); SYMBOL1 COLOR=BLACK VALUE=CIRCLE; SYMBOL2 COLOR=RED VALUE=NONE INTERPOL=JOIN; RUN;