easystats / bayestestR

:ghost: Utilities for analyzing Bayesian models and posterior distributions
https://easystats.github.io/bayestestR/
GNU General Public License v3.0
559 stars 55 forks source link

don't return posterior cell proportions/count for Bayesian contingency table #486

Open IndrajeetPatil opened 2 years ago

IndrajeetPatil commented 2 years ago

Either we just remove it, or we add an argument to oprtionally include it:

cf. https://github.com/easystats/parameters/issues/620#issuecomment-950529365

library(BayesFactor)
library(bayestestR)
data(raceDolls)

contingencyTableBF(raceDolls, sampleType = "indepMulti", fixedMargin = "cols") |>
  describe_posterior()
#> Warning: Could not estimate a good default ROPE range. Using 'c(-0.1, 0.1)'.
#> Summary of Posterior Distribution
#> 
#> Parameter | Median |       95% CI |   pd |          ROPE | % in ROPE |   BF |                            Prior
#> --------------------------------------------------------------------------------------------------------------
#> cell[1,1] |   0.31 | [0.24, 0.38] | 100% | [-0.10, 0.10] |        0% | 1.81 |                                 
#> cell[2,1] |   0.13 | [0.08, 0.19] | 100% | [-0.10, 0.10] |     8.37% | 1.81 |                                 
#> cell[1,2] |   0.30 | [0.23, 0.37] | 100% | [-0.10, 0.10] |        0% | 1.81 |                                 
#> cell[2,2] |   0.26 | [0.19, 0.32] | 100% | [-0.10, 0.10] |        0% | 1.81 |                                 
#> Ratio     |        |              |      |               |           |      | Independent multinomial (0 +- 1)

Created on 2021-11-07 by the reprex package (v2.0.1)

mattansb commented 2 years ago

Shouldn't this be in insight?