powered by
2x2 table calculus for teaching
table2x2( x, digits = 1, stats = c("table", "rd", "rr", "or", "chisq", "fisher") )
see example
2x2 table
rounding digits
subset or all of c("table","rd","or","rr","chisq","fisher") where rd= risk difference, rr = risk ratio, or = odds ratio, chisq = chi-square test, fisher= fisher's exact test and table = the 2x2 table
c("table","rd","or","rr","chisq","fisher")
Thomas A. Gerds <tag@biostat.ku.dk>
table2x2(table("marker"=rbinom(100,1,0.4),"response"=rbinom(100,1,0.1))) table2x2(matrix(c(71,18,38,8),ncol=2),stats="table") table2x2(matrix(c(71,18,38,8),ncol=2),stats=c("rr","fisher"))
Run the code above in your browser using DataLab