[R] Bayesian 2*2 table independence test

Christian Hennig chrish at stats.ucl.ac.uk
Thu May 14 17:46:33 CEST 2009

Dear list,

I'd like to test the null hypothesis of independence in a 2*2 
contingency table in a Bayesian way.
As far as I can see, this can be done by the function ctable in library 
LearnBayes. (More precisely, a Bayes factor can be computed.)

Two questions:
1) Is there any other package/function than can be used for this in a more 
or less straightforward manner?

2) The ctable help page explains the parameter a as
"a: matrix of prior hyperparameters", but it is not explained what the 
prior is and how it precisely depends on these hyperparameters. (I read
the paper test_of_independence.pdf by the package author J. Albert on the 
web, but it only explains the choice a=1+0*data, but not general a.)

Thank you,

*** --- ***
Christian Hennig
University College London, Department of Statistical Science
Gower St., London WC1E 6BT, phone +44 207 679 1698
chrish at stats.ucl.ac.uk, www.homepages.ucl.ac.uk/~ucakche

More information about the R-help mailing list