The Bayes factor provided by contingencyTableBF
tests the independence assumption in
contingency tables under various sampling plans, each of which is described below.
See Gunel and Dickey (1974) for more details.
For sampleType="poisson"
, the sampling plan is assumed to be
one in which observations occur as a poisson process with an overall
rate, and then assignment to particular factor levels occurs with
fixed probability. Under the null hypothesis, the assignments to the
two factors are independent. Importantly, the total N is not fixed.
For sampleType="jointMulti"
(joint multinomial), the sampling
plan is assumed to be one in which the total N is fixed, and observations
are assigned to cells with fixed probability. Under the null hypothesis, the
assignments to the two factors are independent.
For sampleType="indepMulti"
(independent multinomial), the
sampling plan is assumed to be one in which row or column totals are fixed,
and each row or column is assumed to be multinomially distributed.
Under the null hypothesis, each row or column is assumed to have the
same multinomial probabilities. The fixed margin must be given by
the fixedMargin
argument.
For sampleType="hypergeom"
(hypergeometric), the sampling
plan is assumed to be one in which both the row and column totals are fixed.
Under the null hypothesis, the cell counts are assumed to be governed by the
hypergeometric distribution.
For all models, the argument priorConcentration
indexes
the expected deviation from the null hypothesis under the alternative,
and corresponds to Gunel and Dickey's (1974) "a" parameter.