ods pdf file="H:\_ODS\SAS_ACT_10_Output.pdf" notoc; /* SAS Activity #10 */ /* Save data into your library */ /* #1 Create simple random sample from entire dataset */ proc surveyselect data=bio.computer method=srs n=450 out=bio.computer_SRS; run; /* #2 Create new variable for random treatment assignment. */ data bio.computer_SRS; set bio.computer_SRS; TRT = floor(2.99*ranuni(0)+1); run; /* #3 Create side-by-side boxplots for Age and Computer use by treatement */ proc sgplot data=bio.computer_SRS; vbox age / category=trt ; run; proc sgplot data=bio.computer_SRS; vbox comp / category=trt ; run; /* #4 Create frequency tables for gender by treatment */ proc freq data=bio.computer_SRS; tables gender*trt ; run; ods pdf close;