# bf_contingency_tab

##### Bayesian contingency table analysis.

Bayesian contingency table analysis.

##### Usage

```
bf_contingency_tab(data, main, condition, sampling.plan = "indepMulti",
fixed.margin = "rows", prior.concentration = 1, caption = NULL,
output = "caption", k = 2, ...)
```

##### Arguments

- data
A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will

**not**be accepted.- main
The variable to use as the

**rows**in the contingency table.- condition
The variable to use as the

**columns**in the contingency table.- sampling.plan
Character describing the sampling plan. Possible options are

`"indepMulti"`

(independent multinomial; default),`"poisson"`

,`"jointMulti"`

(joint multinomial),`"hypergeom"`

(hypergeometric). For more, see`?BayesFactor::contingencyTableBF()`

.- fixed.margin
For the independent multinomial sampling plan, which margin is fixed (

`"rows"`

or`"cols"`

). Defaults to`"rows"`

.- prior.concentration
Specifies the prior concentration parameter, set to

`1`

by default. It indexes the expected deviation from the null hypothesis under the alternative, and corresponds to Gunel and Dickey's (1974)`"a"`

parameter.- caption
The text for the plot caption.

- output
Can either be

`"caption"`

(which will contain text for evidence in favor of null) or`"results"`

(which will return the dataframe with results).- k
Number of digits after decimal point (should be an integer) (Default:

`k = 2`

).- ...
further arguments to be passed to or from methods.

##### See Also

##### Examples

```
# NOT RUN {
# for reproducibility
set.seed(123)
# to get caption (default)
bf_contingency_tab(
data = mtcars,
main = am,
condition = cyl,
fixed.margin = "cols"
)
# to see results
bf_contingency_tab(
data = mtcars,
main = am,
condition = cyl,
sampling.plan = "jointMulti",
fixed.margin = "rows",
prior.concentration = 1
)
# }
```

*Documentation reproduced from package ggstatsplot, version 0.0.10, License: GPL-3 | file LICENSE*