Jacques VESLOT
2006-Aug-18 16:13 UTC
[R] [Fwd: Trend test and test for homogeneity of odd-ratios]
I partly answered my question since independence_test() function in coin package apparently do Cochran-Armitage trend test just like Eric Lecoutre's function tabletrend() - slightly modified here: > independence_test(pheno ~ geno, data = dat2, teststat = "quad", scores = list(geno = c(0, 1, 2))) Asymptotic General Independence Test data: pheno by groups 1 < 2 < 3 chi-squared = 0.2268, df = 1, p-value = 0.6339 > tabletrend(with(dat2, table(pheno, geno))) [1] 0.6338308 -------- Message original -------- Sujet: Trend test and test for homogeneity of odd-ratios Date: Wed, 16 Aug 2006 17:39:33 +0200 De: Jacques VESLOT <jacques.veslot at good.ibl.fr> Pour: R-Help <r-help at stat.math.ethz.ch> Dear r-users, I am looking for some R functions to do Cochran-Armitage trend test for 2*3 tables (binary phenotype vs. genotypes) and for testing the homogeneity of odds ratios within 2*3*k tables (binary phenotype vs. genotypes vs. strata). In R-Help archives, I've found a 2003 script by Eric Lecoutre for Cochran-Armitage trend test and a script for Breslow-Day test for 2*2*k tables. Could someone please tell we if there were some functions available on CRAN to do such tests ? Thanks, jacques