twoby2(exposure, outcome,
alpha = 0.05, print = TRUE, dec = 4,
conf.level = 1-alpha, F.lim = 10000)
alpha
F.lim
, Fisher's exact
test is not computedTreat <- sample(c("A","B"), 50, rep=TRUE )
Resp <- c("Yes","No")[1+rbinom(50,1,0.3+0.2*(Treat=="A"))]
twoby2( Treat, Resp )
twoby2( table( Treat, Resp )[,2:1] ) # Comparison the other way round
Run the code above in your browser using DataLab