XYZ Pharmaceutical, Inc. conducted a clinical study on four clinical sites ('01', '02', '03', and '04'). A portion of the outcomes recorded vital signs for each subject at 2 weeks, 1 week, and 4 days before treatment date; vital signs for each subject twice on treatment date before treatment was applied to the subject; vital signs for each subject twice at 2-week post treatment visit. Vital signs recorded are sbp (Systolic Blood Pressure), dbp (Diastolic Blood Pressure), and map (Mean Arterial Pressure). The last one was computed by map = (sbp + 2×dbp)/3. Note that some subjects may be absent from at least one pre-treatment visits (2-week, 1-week, or 4-day prior to treatment date). The vital sign data were reorganized as subject-level data set found in vital.csv in which pre-treatment vital signs were in variables sbp11 to sbp15 for sbp, dbp11 to dbp15 for dbp, and map11 to map15 for map. The vital sign for absent visit was recorded as missing value. For 2-week post-treatment, vital signs were in sbp21 and sbp22 for sbp; dbp21 and dbp22 for dbp; and map21 and map22 for map. This data set is read as a SAS data set, named vital (see SAS codes in the link mentioned below).
For each subject and for each vital sign, a baseline value, a 2-week post-treatment value,
and change from the baseline will be calculated.
The baseline value for any vital sign is calculated by combining the 5 pre-treatment measurements in one of two ways:
chg = base - vswhere base is the baseline value and vs is the vital sign value calculated at the 2-week post-treatment visit.
You are to create a simple summary statistics for a selected vital sign (one of
sbp, dbp, map), a selected study site (one from '01', '02', '03', '04'), and for one of
the two combining methods as mentioned above (one of Average, WOCF)).
The key that was assigned to you will set several macro variables that will
decide the selections of vital sign, study site, and combining method.
The buggy SAS codes mentioned below has a macro statement that assigns a key value of 24. After correcting the SAS codes, this key value should produce an output like egOutput.txt. This plain text file gives you the opportunity to check if you make all corrections needed. You will then change the key value to the one that was assigned to you.
The buggy SAS codes were in SAS Codes (FinalExam.sas) in which many coding errors occur. These errors could be