Download the macros and data sets from Fernandez's web site. 1. Visit the author's home page: {www.ag.unr.edu/gf/dm.html}. 2. Click "DOWNLOAD Data and Macro-Call Files" (under Preface, preceded by a quadruple asterisk). 3. Enter the username and password on page 354 of the textbook. 4. On the screen that appears, click the "Download" button and then choose "Save". This will put the files into a compressed (zipped) folder called "dm" in the directory of your choice. This may be something like "U:\" or "C:\" or "D:\CPH636\". 5. Double click the compressed (zipped) folder called "dm". Select "Extract all files" from the "Folder Tasks" box. Follow the instructions of the Extraction Wizard. 6. Leave the compressed (zipped) folder and go to the uncompressed folder. You will see "README" and two other folders: "maccall" and "sasdata". Make a third folder by right-clicking on empty space, selecting "New", and then "Folder". Name the folder "RC". Actually, you can name the folder whatever you want if you substitute your name for "RC" wherever "RC" appears in the instructions below. Use the EXCELSAS macro. 1. Activate SAS. Issue the following commands (with appropriate substitutions for "U:\"). LIBNAME GFLib 'U:\dm\sasdata' ; LIBNAME RCLib 'U:\dm\RC' ; 2. Go to my web page: {www.richardcharnigo.net/CPH636S09/index.html}. 3. Save the files {Diabetes.xls} and {DiabetesInfo.xls} to your "RC" folder. The former contains the data set; the latter contains information about the data set. If you wish, briefly inspect both files. Then close them. 4. In SAS, from the File menu choose "Open". Go to your "dm" folder and, from there, to the "maccall" folder. Select "excelsas" and click on the "Open" button. 5. Click the runner icon in the toolbar at the top of the screen. 6. Fill in the blanks and hit enter. Instructions are given on pages 24-25 of the textbook. You can try the following (with appropriate substitutions for "U:\"). excel U:\dm\RC\ Diabetes RCLib U:\dm\RC\ word 7. Open the Word file "U:\dm\RC\Diabetes.doc" to view the first ten observations and summary statistics. 8. In SAS, you can issue the following commands to view the full data set and to restore the original variable names that were present in {Diabetes.xls}. TITLE ' '; PROC PRINT DATA = RCLib.Diabetes; RUN; DATA RCLib.Diabetes; SET RCLib.Diabetes; npreg = X1; glu = X2; bp = X3; bmi = X4; age = X5; diab = X6; RUN; 9. You could (if desired) apply other SAS PROCs that you had learned about in STA 503, STA 570, STA 580, CPH 630, CPH 930, STA 671, or CPH 535. An example for PROC LOGISTIC is shown below, and I have sample code for many other SAS PROCs at {http://web.as.uky.edu/statistics/users/rjchar2/STA503F06/SAS503F06.pdf}. A wealth of information about SAS PROCs is available at {http://www.sfu.ca/sasdoc/sashtml/stat/index.htm}. PROC LOGISTIC data = RCLib.Diabetes DESCEND; model diab = npreg glu / ctable pprob=0.3 to 0.7 by 0.1; RUN; Use the RANSPLIT macro. 1. Activate SAS. Issue the following commands (with appropriate substitutions for "U:\"). LIBNAME GFLib 'U:\dm\sasdata' ; LIBNAME RCLib 'U:\dm\RC' ; 2. In SAS, from the File menu choose "Open". Go to your "dm" folder and, from there, to the "maccall" folder. Select "ransplit" and click on the "Open" button. 3. Click the runner icon in the toolbar at the top of the screen. 4. Fill in the blanks and hit enter. Instructions are given on pages 34-37 of the textbook. You can try the following (with appropriate substitutions for "U:\"). RCLib.Diabetes npreg glu bmi bp age 100 50 U:\dm\RC\ U:\dm\RC\ word 1 RCLib 5. Open the Word file "U:\dm\RC\RCLib.Diabetes1.doc" to view the first ten observations in the training data set and box plots that compare the training, validation, and test data sets. 6. Due to a bug in the RANSPLIT macro, you may need to shut down and then restart SAS to examine or manipulate the training, validation, and test data sets. In this case, repeat step 1 above before continuing. 7. In SAS, you can issue the following commands to view the training, validation, and test data sets. TITLE ' '; PROC PRINT DATA = RCLib.Train_; RUN; PROC PRINT DATA = RCLib.Valid_; RUN; PROC PRINT DATA = RCLib.Test_; RUN; 8. If you wish to rename these data sets, you can use syntax like the following. DATA RCLib.NewName; SET RCLib.Train_; RUN; PROC PRINT DATA = RCLib.NewName; RUN;