Closed IndrajeetPatil closed 3 years ago
There can be many other cases where the resulting BF is not a comparison to the NULL in the denominator:
library(BayesFactor)
library(parameters)
mod <- correlationBF(mtcars$carb, mtcars$gear, nullInterval = c(0, 1))
mod <- mod[1] / mod[2]
mod
#> Bayes factor analysis
#> --------------
#> [1] Alt., r=0.333 0<rho<1 : 11.17689 ±NA%
#>
#> Against denominator:
#> Alternative, r = 0.333333333333333, rho =/= 0 !(0<rho<1)
#> ---
#> Bayes factor type: BFcorrelation, Jeffreys-beta*
model_parameters(mod) # not BF10
#> Multiple `BFBayesFactor` models detected - posteriors are extracted from the first numerator model.
#> See help("get_parameters", package = "insight").
#> Multiple `BFBayesFactor` models detected - posteriors are extracted from the first numerator model.
#> See help("get_parameters", package = "insight").
#> # Bayesian correlation analysis
#>
#> Parameter | Median | 89% CI | pd | % in ROPE | Prior | BF | Method
#> -----------------------------------------------------------------------------------------------------------------
#> rho | 0.29 | [0.03, 0.49] | 100% | 9.58% | Cauchy (0 +- 0.33) | 11.18 | Bayesian correlation analysis
Another example:
m1 <- lmBF(mpg ~ am, mtcars)
m2 <- lmBF(mpg ~ hp, mtcars)
m3 <- lmBF(mpg ~ hp + hp, mtcars)
m2 / m1
#> Bayes factor analysis
#> --------------
#> [1] hp : 652.5196 ±0.01%
#>
#> Against denominator:
#> mpg ~ am
#> ---
#> Bayes factor type: BFlinearModel, JZS
model_parameters(m2 / m1) # not BF10
#> Multiple `BFBayesFactor` models detected - posteriors are extracted from the first numerator model.
#> See help("get_parameters", package = "insight").
#> Multiple `BFBayesFactor` models detected - posteriors are extracted from the first numerator model.
#> See help("get_parameters", package = "insight").
#> # Bayes factors for linear models
#>
#> # Extra Parameters
#>
#> Parameter | Median | 89% CI | pd | % in ROPE | BF | Method
#> -------------------------------------------------------------------------------------------------
#> mu | 20.08 | [18.85, 21.16] | 100% | 0% | 652.52 | Bayes factors for linear models
#> sig2 | 15.75 | [10.18, 23.47] | 100% | 0% | 652.52 | Bayes factors for linear models
#> g | 0.95 | [ 0.05, 5.86] | 100% | 38.02% | 652.52 | Bayes factors for linear models
#>
#> # Fixed Effects
#>
#> Parameter | Median | 89% CI | pd | % in ROPE | BF | Method
#> -------------------------------------------------------------------------------------------------
#> hp | -0.06 | [-0.08, -0.05] | 100% | 100% | 652.52 | Bayes factors for linear models
m1 / m3
#> Bayes factor analysis
#> --------------
#> [1] am : 0.001532521 ±0.01%
#>
#> Against denominator:
#> mpg ~ hp + hp
#> ---
#> Bayes factor type: BFlinearModel, JZS
model_parameters(m1 / m3) # not BF10
#> Multiple `BFBayesFactor` models detected - posteriors are extracted from the first numerator model.
#> See help("get_parameters", package = "insight").
#> Multiple `BFBayesFactor` models detected - posteriors are extracted from the first numerator model.
#> See help("get_parameters", package = "insight").
#> # Bayes factors for linear models
#>
#> # Extra Parameters
#>
#> Parameter | Median | 89% CI | pd | % in ROPE | BF | Method
#> ------------------------------------------------------------------------------------------------
#> mu | 20.08 | [18.61, 21.45] | 100% | 0% | 0.002 | Bayes factors for linear models
#> sig2 | 25.31 | [16.03, 37.24] | 100% | 0% | 0.002 | Bayes factors for linear models
#> g | 0.39 | [ 0.02, 2.53] | 100% | 70.46% | 0.002 | Bayes factors for linear models
#>
#> # Fixed Effects
#>
#> Parameter | Median | 89% CI | pd | % in ROPE | BF | Method
#> ----------------------------------------------------------------------------------------------
#> am | 6.50 | [3.53, 9.48] | 100% | 0% | 0.002 | Bayes factors for linear models
Created on 2021-01-30 by the reprex package (v0.3.0)
Ah, fair enough. Wasn't even thinking of more complex models when I was thinking about this issue.
You are right, then it would be uncalled-for to default to BF10
.
That's what I'm here for 😋 - we each play our part in the circle to ~life~ easystats!
I'm personally not a fan of the 10/01 denomination which I find rather confusing. I remember in the (very) early days it took me some time to realize that it meant 1 vs 0 or the opposite, as I was naturally reading it as "ten"... but then maybe I'm the only one in that case 🤷
I agree - as BFs are always comparative, and I think it is best practice to say explicitly what is being compared, the notations of BF10 BF01, BF1+ are redundant (e.g., not needed if I say "The model without a linear correlation was strongly supported by the data over the model with a positive correlation (BF = 782.1)")
Also, if we use protect_ratio = TRUE
, we don't need to flip BFs to make them human readable:
insight::format_bf(0.0414, protect_ratio = TRUE)
#> [1] "BF = 1/24.15"
Created on 2021-01-31 by the reprex package (v0.3.0)
I agree that this nomenclature is not ideal but that's what is adopted by virtually all pioneers who have written about this topic (e.g., Wagenmakers) and the software programs that support these analyses, so you can't blame users to be used to it or even to be expecting it.
Since
model_parameters
alway returns the Bayes Factor indexing evidence in favor of the alternative over the null hypothesis (BF10
), and never the reverse (BF01
), I feel we should be explicit about this in the column name.BF10
BF01
If you wonder why someone might be expecting anything other than
BF10
as a default, it's because all other pieces of software (JASP
,jamovi
, etc.) that deal with these objects allow users to choose from these two (BF10
andBF01
) options.