Lab 11 ObjectivesIn this lab we will use S-Plus to do what might be considered the last step in the Mantel-Haenszel method. We will use the data in section 16.3, Further Applications, pages 387-393. (This is a short lab.) Mantel-HaenszelTurn to Section 16.3, page 387 of POB. We will use the S-Plus command line to enter the data from 2 studies on term pregnancies and cancer into a 2x2x2 array. The analysis on pages 387-389 comes to the conclusion that the relationship between term pregnancies and cancer does not depend on the study. We will not use S-Plus to mimic this part of the analysis, but will use S-Plus to demonstrate the Mantel-Haenszel method for combining information in the 2 tables to test for an association between term pregnancies and cancer. In particular, we will mimic the analysis starting on the bottom of page 391 through 393, but will not calculate odds ratios or CIs for odds ratios as on pages 390-391. We need to use the command line to enter the table information into a 2x2x2 array. Open up the command line window. (Remember how to do this? See earlier labs or ask your TA.) At the command prompt type the following (ignore my comments prefaced by ###) ### make a 2x2x2 array (2 rows, 2 columns, 2 "deep"):> mh.array<-array(c(31, 93, 80, 379, 39, 74, 149, 465), dim=c(2,2,2)) ### give the array some meaningful dimension names: > dimnames(mh.array)<-list(c("cancer", "no.cancer"), c("no.preg", "preg"), c("study.1", "study.2")) ### print out the array to check that it looks like the tables on page 387 > mh.array ### output here Again, the analysis in the book concludes that it is appropriate to combine information across tables and we jump to that part of the analysis beginning on the bottom of page 391 (last sentence). To perform the M-H test for association in S-Plus enter the following at the command prompt (again, ignore my comments prefaced by ###): ### perform the M-H chi-square test for association w/o a correction:> mh.test<-mantelhaen.test(mh.array, correct=F) ### print out the test results (same as in table 16.1, page 393) > mh.test ### output here ### okay, let's apply a correction to make the approximate chi-square a little better (presumably): > mh.test.cor<-mantelhaen.test(mh.array, correct=T) > mh.test ### output here What do you conclude? Notice that we get only an indication that there is some sort of association of cancer with term pregnancies. The odds ratio calculations on pages 390-391 give us a little more information in that we can say the odds of developing cancer for those women never having a term pregnancy are about 61% higher than those women who have had a term pregnancy. |