/* Computer Exercise #1 */ options pageno=1 ps=56 ls=79; footnote 'SAS program: c:\faiz\sas\source\fall97\bios145\compex1.sas'; libname datain xport 'c:\faiz\www\fall97\bios145\pone0997.xpt'; libname dataout 'c:\faiz\sas\sasdata\fall97\bios145'; proc copy in=datain out=dataout; run; data one; set dataout.pone; bmi = wt / ((ht/100)**2); ** Create BMI variable **; run; proc sort data=one out=two; ** Sort data by SEX **; by sex; run; /* #1 */ proc reg data=two; ** Relationship between DST and BMI by SEX **; by sex; model dst=bmi; title1 "BIOS 145 Computer Exercise #1"; title2 "DST on BMI by SEX"; quit; proc reg data=two; ** Relationship between HDL and BMI by SEX **; by sex; model hdl=bmi; title2 "HDL on BMI by SEX"; quit; /* #2 */ proc reg data=two; by sex; ** Relationship between WT and HT by SEX **; model wt=ht; title2 "WT on HT by SEX"; quit; proc rsreg data=two; ** Lack of fit for WT on HT by SEX **; by sex; model wt=ht / lackfit covar=1; title2 "Lack of fit for WT on HT by SEX"; quit; symbol1 color=black v=dot i=rl; proc gplot data=two; ** Plot overlaid data **; by sex; title2 h=2 f=swiss 'Weight vs. Height'; plot wt*ht; run; quit;