I was chasing down a citation about the incidence of postoperative wound infection in diabetic patients, and I found this 1998 abstract by Pomposelli with the following statement:
"In patients with hyperglycemia (> 220 mg/dL) on POD 1, the infection rate was 2.7 times that observed (31.3% vs 11.5%) in diabetic patients with all serum glucose values < 220 mg/dL. When minor infection of the urinary tract was excluded, the relative risk for "serious" postoperative infection increased to 5.7 when any POD 1 blood glucose level was > 220 mg/dL."
I pulled the article and the contingency table data is as follows (excerpted):
Table III: Blood glucose and infection rate contingency tables POD 1 Highest glucose Infected Uninfected p value <=220 mg/dL 3 23 .05 >220 mg/dL 21 46 Table IV: Postoperative day 1 blood glucose and infection rate contingency table excluding urinary tract infections Highest glucose Infected Uninfected p value <=220 mg/dL 1 23 .03 >220 mg/dL 15 46
The caption for both says "Actual p values of chi-squared shown."
When I run this in R I get:
> pod1AllInfections <- data.frame(infected=c(3,21),uninfected=c(23,46)) > row.names(pod1AllInfections) <- c("above220","below220") > chisq.test(pod1AllInfections,simulate.p.value=TRUE) Pearson's Chi-squared test with simulated p-value (based on 2000 replicates) data: pod1AllInfections X-squared = 3.8372, df = NA, p-value = 0.06997
and for the other table:
> pod1ExcludeUTIs <- data.frame(infected=c(1,15),uninfected=c(23,46)) > row.names(pod1ExcludeUTIs) <- c("above220","below220") > chisq.test(pod1ExcludeUTIs,simulate.p.value=TRUE) Pearson's Chi-squared test with simulated p-value (based on 2000 replicates) data: pod1ExcludeUTIs X-squared = 4.7017, df = NA, p-value = 0.03598
My question is, am I doing the chi-square calculation correctly in R? I don't understand the simulate.p.value=TRUE flag that well despite reading what I can on Google.
My second question is, for this study what's the correct contingency table analysis to do?
My last question is about Table IV -- is it biostatistically kosher to just exclude a subgroup of patients (in this case, those with UTIs) from the table?