| Solutions
Assignment
9: Creating
a Preliminary Data Report - The
Fetal Lung Maturity Study
|
|
- Write a SAS program
to read the data into a SAS data set.
a. Create a variable to indicate if the delivery is preterm,
fullterm, postdates or of unknown gestational age. 37-42 weeks
is considered fullterm, anything greater than 42 is postdates,
and anything less than 37 is preterm.
b. Create variables to indicate whether the FLM value is below
the cutoff value of 50 for prematurity, and create a second
indicator variable for FLM < 70.
c. Label all variables, create a format data set and assign
formats to the variables, as appropriate. Save the data in
a permanent SAS data set. Use Proc Contents to document the
data set.
The program to accomplish these steps
is contained in the file hw9_2011p1.sas.
A few features to note: on the
options line you can use errors=n, where
n is some small number (e.g., n <=3).
Then only the first n incidents
of invalid data will be printed on the log.
Note also the statements creating the indicator variables:
**
create indicators of flm <50, <70 **;
flm50 = (0 < flm < 50);
flm70 = (0 < flm < 70);
In this example the variables will be assigned the value 1
when the statement in parentheses is true, and will be assigned
the value 0, otherwise. First check that there are no missing values for flm or these will fall into the "false" group with flm50=0 and flm70=0.
- Write
a preliminary summary report of no more than 5 pages inclusive
of tables for the investigator (a physician, not
a statistician), describing the data in detail. This is
not an analysis report (no hypotheses, statistical tests,
inferences), but a preliminary report with descriptive information
on the data.
As appropriate, your SAS output should be incorporated into
the report. Your report should address the following questions:
How many records are there?
Are there any duplicate records?
Are there any values that appear unusual or suspicious to
you?
How have you handled any problem records? What was your rationale?
How have you handled any problem values? What was your rationale?
Produce simple frequency tables of the respiratory distress,
blood in sample, maturity at delivery (preterm/fullterm/postdates),
and the FLM cutoff indicators.
The program to run the rest of the steps
are in the file hw9_2011p2.sas.
Note: I have added some plots that help you look at the data -- these weren't in your assignment, but we will discuss.
|