Instructions for Problem Sets

How to Use the Problem Set Data Files

How to Create a SAS Library

Using a SAS Data Set in the PROBLEMS Library

How to Use the Problem Set Data Files

Starting with Chapter 3, each chapter in this book contains problem sets. For some of these problems, you will need access to data. Some of the data is stored in Excel files, CSV files, raw data files, and SAS data sets.

To keep things simple, all of the data related to the end-of-chapter problems was put in a ZIP file that you can download from the site:

support.sas.com/cody

Click "Example Code and Data" under Biostatistics by Example, and you will see two ZIP files. One contains data files used in the book, in case you want to try running the tasks and programs yourself. The other file, labeled Problem Data, contains all of the data related to the problem sets.

The easiest way to proceed is to unzip the problem files and copy them to your hard drive to a folder called:

c:SASUniversityEditionmyfoldersProblems

If you do this, when you open SAS Studio (assuming you set up the shared folder in the installation instructions), you will see the files in SAS Studio under My Folders and Problems. It should look something like this:

Figure 1: The Data for Problem Sets in SAS Studio

image

One of the data sets is a SAS data set (Blood_Pressure.sas7bdat, seen at the top of the list in Figure 1). The others are Excel files, CSV files, and text files. To use the Blood_Pressure SAS data set, you will need to create a SAS library. See the next section on how to do this.

How to Create a SAS Library

In order to use the downloaded SAS data set in any of the statistics tasks, you first need to create a SAS library. This is very easy to do—just proceed with the following steps:

1.   First, expand Server Files and Folders in the Navigation pane.

2.   Next, right-click "Problems" under My Folders. It should look like this:

Figure 2: Creating a SAS Library

image

3.   Select Create ▶ Library and click the left mouse button. You will see the following:

Figure 3: Next Step in Creating your SAS Library

image

4.   Enter the name PROBLEMS and check the box labeled Re-create this library at start-up.

Now, when you open a task, the PROBLEMS library will show up (see Figure 4):

Figure 4: The New PROBLEMS Library Is Now Available

image

Note: Your list might contain other data sets along with Blood_Pressure.

Using a SAS Data Set in the PROBLEMS Library

As an example, suppose you want to compute summary statistics on the variables SBP and DBP (systolic and diastolic blood pressures) in the Blood_Pressure SAS data set. First, select Summary Statistics in the Statistics task list. On the Data tab, click the Select a Table icon (Figure 5):

Figure 5: Select a Table

image

The list of tables will now show all of the SAS data sets you downloaded (Figure 6):

Figure 6: List of Tables

image

You can now compute summary statistics for SBP and DBP in the Blood_Pressure data set.

Figure 7: Selecting Variables from the Blood_Pressure Data Set

image

You are done!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.44.53