FILENAME goptions URL "http://192.38.117.59/~linearpredictors/datafiles/goptions.sas"; %include goptions; FILENAME url URL "http://192.38.117.59/~linearpredictors/datafiles/readFever.sas"; %include url; DATA fever; SET fever; IF weight=0 THEN weight=.; ga=(gwbirth>31)+(gwbirth>32)+(gwbirth>33)+(gwbirth>34)+(gwbirth>35)+ (gwbirth>36)+(gwbirth>37)+(gwbirth>38)+(gwbirth>39)+(gwbirth>40); parity2=(parity>0); IF parity=. THEN parity2=.; PROC SORT; BY ga; RUN; PROC UNIVARIATE DATA=fever pctldef=3 NOPRINT; BY ga; VAR weight; OUTPUT OUT=sgalimits PCTLPTS = 5 PCTLPRE = pct; RUN; DATA sgalimits; SET sgalimits; IF ga=0 THEN DELETE; RUN; DATA fever; SET fever; IF ga=0 then ga=1; RUN; DATA fever; MERGE fever sgalimits; BY ga; sga=(weight