Description Usage Arguments Details Author(s)
View source: R/Cochran-Armitage.test.mod.R
See Clayton & Hills 20.3 pp 201-203 for statistical details
1 | Cochran.Armitage.test(exposure, cc, stratum = rep(1, length(cc)))
|
exposure |
vector |
cc |
vector |
stratum |
(optional) vector of strata |
This version is modified (bugfixed) from an original function by David Clayton as below
change x2 <- sum(ut^2/vt,na.rm=T) to x2 <- sum(ut,na.rm=T)^2/sum(vt,na.rm=T)
Modified Feb 2014 to change ut <- dh[,1]*dh[,2]*(zm[,1] - zm[,2])/nt to ut <- dh[,1]*dh[,2]*(zm[,2] - zm[,1])/nt so that sign(ut)>0 for positive correlation
David Clayton, with modifications by Chris Wallace
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.