Skip to content
Prev 164554 / 398503 Next

Cochran-Armitage

On 12/12/2008 3:29 AM, robert-mcfadden at o2.pl wrote:
But there is this example in coin:

### Cochran-Armitage trend test for proportions
### Lung tumors in female mice exposed to 1,2-dichloroethane
### Encyclopedia of Biostatistics (Armitage & Colton, 1998),
### Chapter Trend Test for Counts and Proportions, page 4578, Table 2
lungtumor <- data.frame(dose = rep(c(0, 1, 2), c(40, 50, 48)),
                        tumor = c(rep(c(0, 1), c(38, 2)),
                                  rep(c(0, 1), c(43, 7)),
                                  rep(c(0, 1), c(33, 15))))
table(lungtumor$dose, lungtumor$tumor)

### Cochran-Armitage test (permutation equivalent to correlation
### between dose and tumor), cf. Table 2 for results
independence_test(tumor ~ dose, data = lungtumor, teststat = "quad")

  See the following:

http://finzi.psych.upenn.edu/R/library/coin/html/ContingencyTests.html

  There also is an implementation in the GeneticsBase package
(Bioconductor).