OPTIONS LINESIZE=88 PAGESIZE=53 NOCENTER NODATE NONUMBER NOFMTERR; *********************************************************************; * Project name: Learn to use EPIINFO ; * Program Name Date Programmer ; TITLE "Sourse:hw15.sas 12/01/99 CJ" ; * Description: Soil ingestion studies are conducted to estimated the; * quantity of soil casually ingested by children and adults ; *********************************************************************; LIBNAME new "C:\temp"; DATA food(drop=al0); SET new.food; rename al_f=al_fd f_pid=Fd_pid; DATA fecal(drop=al0); SET new.fecal; rename al_f=al_fl; DATA soil(keep=al0 pidx); SET new.soil; proc sort data=food; by pidx; proc sort data=fecal; by pidx; proc sort data=soil; by pidx; **********************************; *Q2. average daily amount of soil ; *ingested for each subjects ; **********************************; PROC sort data=new.d3; by pidx; DATA new.d4; set new.d3; BY pidx; retain digest1 n 0; if digest ne . then do; digest1=digest1+digest; n=n+1; if last.pidx then do; rate=digest1/n; output; n=0; digest1=0; end; end; label rate='average*daily*soil*digest*(mg)'; DATA new.d5(keep=pidx digest rate); set new.d4; proc print data=new.d5 split="*"; Title2 "Table2. The average daily amount of soil ingested "; run;