Lab Assignment 3

advertisement

Lab Assignment #3

(1) Using clinical data set and collapse CLINICAL on PATNUM (patient number)

Calculate mean and max CHOL, SBP, DBP

Calculate ratio of mean SBP to DBP

Name new (collapsed dataset) Clin_1

(2) Collapse CLINICAL on PATNUM (patient number)

Calculate proportion of ROUTINE visits

Name new (collapsed dataset) Clin_2

(3) Merge Clin_1 to Clin_2 on PATNUM

(4) Tabulate the proportion of "successful" merges

(5) Format the value of the variable RATIO (in data formed by merging Clin_1 &

Clin_2) to have only two decimal places.

(6) Create a new dataset from the (original) CLINICAL data set, name it CLIN_TEMP. Make three new variables in CLIN_TEMP based on the DATE variable. Format the three new date variables so they look like the following:

New

DateVar Look/Apparence

08

08-27-1999

08/27/99

(7) What is the SAS date (number of days from 1/1/1960) for the subject ID=02 who visited the clinic on 02/19/90.

(8) Create/generate three new variables from the CLINICAL data set, with names and specifications as follows:

(9) Create/generate a new variable named DATE4 that properly combines the three "date" variables DAY MONTH AND YEAR. Format the new variable so it looks like 06SEP2003.

(10) Somehow get the posted EXCEL data into SAS format. Do a proc contents to confirm this.

Download