Fall 2015 Stat6800 Final Exam

Web Address of This Page


Problem Description

URX Pharmaceutical, Inc. conducted a clinical study. A portion of the data recorded the inclusion-exclusion criteria outcomes. These information for the 9 sites, coded as numeric (0 to 8) of various number of subjects each were recorded in inclexcl.csv. Subjects were labelled as numeric (1, 2, ...) These information are read into SAS data set ie.

A subject is included in the study if he/she meets all inclusion criteria ("Yes" in all incl1, incl2, incl3, incl4, incl5, incl6). In addition, a subject is excluded in the study if he/she does not meet one or more exclusion criteria (a "Yes" or more in excl1, excl2, excl3, excl4, excl5). In two data steps (my_ie and inclexcl_? where ? = one of 0 to 8), you are to create a final data set (example data view inclexcl_0.png) containing 4 variables:

  1. usubjid: Unique Subject ID of the form URX-015R-00-007 for subject 7 in study site 0
  2. inclusion: Yes if all inclusion criteria met and No otherwise
  3. exclusion: Yes if one or more exclusions criteria met and No otherwise
  4. ittfl: Intent-to treat population flag, Yes if inclusion="Yes" and exclusion="No"


Your WIN will set a random seed so that you will be working on a randomly selected site (from sites 1 to 8) to produce a data set. For example, if you are assigned to site 5, you will need to come up with SAS data set inclexcl_5.

You are provided a SAS Codes (FinalExam.sas) in which many coding errors occur. These errors could be

You are to correct all errors. The SAS log generated from running your SAS codes is expected to be error free.

After correcting your SAS codes, comment the line

    %let _site = 0;
    %*let _site = 0;
and rerun your entire SAS codes to get the right data set. Name your corrected SAS codes as yourLastName_Final.sas. Clearly mark all errors in the provided SAS codes. You can place the buggy code chunks (i.e., a code chunk=a data step or a procedure step or a standalone statement) in a SAS comments and identify errors in it.

Program Submission

You are to submit SAS codes only (as an attachment) through email and get a confirmation of receipt from the instructor before you leave. My email address is