Odds Ratio when cell count is zero
Prepared by Prajitha Nair
If frequency of the counts in any one of the cell is zero then the odds ratio cannot be computed?
Consider the example:
data gene;
input cat $7. genstatus $4. count;
cards;
case abn 119
control abn 0
case nor 317
control nor 319
;
run;
ods output RelativeRisks=relrisk(where=(studytype="Case-Control (Odds Ratio)"));
proc freq data=gene ;
tables cat*genstatus/relrisk ;
weight count;
run;
ods output close;
The output will look as follows:
This can be resolved as follows:
ods output CommonRelRisks=cmnrelrisk;
proc freq data=gene ;
tables cat*genstatus/relrisk cmh ;
weight count;
run;
ods output close;
The output will be produced as:
data cmnrelrisk_1(keep=Value LowerCL UpperCL);
set cmnrelrisk;
if studytype eq " (Odds Ratio)" then if method eq "Logit **" and value ne . then output;
else if studytype="Case-Control" then if method eq "Mantel-Haenszel" and value not in (.,0.0000) then output;
format LowerCL UpperCL ODDSR8.3 value ODDSR8.3;
run;
The cmh option will help to tackle the problem. The logit method will add 0.5 in all the cells of the 2 x 2 cross tabulation table where zero is in anyone of the cell and then odds ratio is evaluated.
Thus the odds ratio obtained is 240.506.
No comments:
Post a Comment