[R] Cochran-Armitage
Chuck Cleland
ccleland at optonline.net
Fri Dec 12 12:40:23 CET 2008
On 12/12/2008 3:29 AM, robert-mcfadden at o2.pl wrote:
> Hello,
> Which package allows to use Cochrana-Armitage trend test? I tried to search for but I found only package coin in which there is no explicit function.
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).
> Best,
> RobMac
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894
More information about the R-help
mailing list