Posts Tagged ‘ contingency tables ’

A multidimensional "which" function

September 16, 2011
By
A multidimensional "which" function

The well-known which function accepts a logical vector and returns the indices where its value equals TRUE. Actually, which also accepts matrices or multidimensional arrays. Internally, R uses a single index to run through such two- or higher-dimension...

Read more »

Computing Odds Ratios in R

Computing Odds Ratios in R

In my last post, I discussed the use of odds ratios to characterize the association between edibility and binary mushroom characteristics for the mushrooms characterized in the UCI mushroom dataset.  I did not, however, describe those co...

Read more »

Barnard’s exact test – a powerful alternative for Fisher’s exact test (implemented in R)

February 7, 2010
By
Barnard’s exact test – a powerful alternative for Fisher’s exact test (implemented in R)

(The R code for Barnard’s exact test is at the end of the article, and you could also just download it from here) About Barnard’s exact test About half a year ago, I was studying various statistical methods to employ on contingency tables. I came across a promising method for 2×2 contingency tables called “Barnard’s exact test“. Barnard’s test is a non-parametric alternative to Fisher’s exact...

Read more »