Cochran.Armitage.test: Cochran Armitage test - with Mantel extension

Description Usage Arguments Details Author(s)

View source: R/Cochran-Armitage.test.mod.R

Description

See Clayton & Hills 20.3 pp 201-203 for statistical details

Usage

1
Cochran.Armitage.test(exposure, cc, stratum = rep(1, length(cc)))

Arguments

exposure

vector

cc

vector

stratum

(optional) vector of strata

Details

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

Author(s)

David Clayton, with modifications by Chris Wallace


chr1swallace/random-functions documentation built on Oct. 6, 2017, 11:50 a.m.