In: Statistics and Probability
Investigators conducted a case control study to determine if there was an association between asthma symptoms and exposure to dust (dust or no dust). They collected information from 62 matched pairs of cases (those experiencing asthma symptoms) and controls (those not experiencing asthma symptoms). They entered their observed counts in SAS using the code below:
data study;
input case $ control $ count @@;
cards;
dust dust 10
dust no_dust 35
no_dust dust 12
no_dust no_dust 5
;
run;
a) Explain what the value 35 represents in the line of code dust no_dust 35.
(b) Construct an appropriate ‘matched pairs’ table by hand and compute the sample OR for having asthma symptoms comparing those exposed to dust to those not exposed to dust. Interpret this sample OR.
controls |
||
cases |
Dust |
No Dust |
Dust |
10 |
35 |
No Dust |
12 |
5 |
(c) By hand, construct the 2x2 table that ignores the matching and simply cross classifies case status and exposure. By hand, compute the sample OR and interpret it.
Ans: a)
@@(double trailing) is used when you want more than one observation from a single record. It tells SAS to not to read a new record when an INPUT statement is encountered.
The current observation is being held in the input buffer until the end of the record is reached. The program does not automatically place the next record into the input buffer each time the INPUT statement is executed, and the current record is not automatically released when it returns to the top of the DATA step. As a result, the pointer location is maintained on the current record which enables the program to read each value in that record.
For example you want to create multiple observations for each input data record
data study;
input case $ control $ count @@;
cards;
dust dust 10 dust no_dust 50 dust no_dust 60
dust no_dust 35
no_dust dust 12
no_dust no_dust 5
;
In the first line you can see I have written multiple observations,SAS will read all the observation for the first records then it will go next line
Output will be like this
case control count
dust dust 10
dust no_dust 50
dust no_dust 60
dust no_dust 35
no_dust dust 12
no_dust no_dust 5