/* $Id: simpleappSAS.sas,v 1.3 2009/06/23 19:04:52 kkleinma Exp $ */ /* These examples use the HELP data sets, available from http://www.math.smith.edu/sasr/datasets.php. The code provided in these code files reads the data sets in the various formats provided there. For smooth running, we suggest downloading all of the files available. For Windows based systems, the files should be stored in c:\data. The code in the book was run on a windows system in this configuration. For other operating systems, you will need to modify the code below to reflect different directory structures and references. */ *** SAS file generated by sastangle ***; options nocenter nodate nonumber ls=80 formdlim=''; *** Code chunk number 2 ***; data test; do i = 1 to 100; x1 = normal(0); x2 = uniform(0); output; end; run; *** Code chunk number 4 ***; proc print data=test (obs=5); run; *** Code chunk number 6 ***; ods select moments; proc univariate data=test; var x1; run; ods select all; *** Code chunk number 7 ***; ods select moments; ods noproctitle; proc univariate data=test; var x2; run; ods select all; *** Code chunk number 10 ***; options ls=78 ps=60 nocenter; *** Code chunk number 19 ***; data test2; do i = 1 to 100; if i lt 51 then x=1; else x=0; y = normal(0) + x; output; end; run; *** Code chunk number 21 ***; options ls = 74; ods trace on/listing; proc ttest data = test2; class x; var y; run; ods trace off; *** Code chunk number 26 ***; ods select none; ods output ttests=appendixattest; proc ttest data=test2; class x; var y; run; ods select all; options ls = 74; proc print data=appendixattest; run; *** Code chunk number 27 ***; ods select ttests; proc ttest data=test2; class x; var y; run; ods select all;