Skip to content

Mislabelled output for BayesFactor::regressionBF() models? #1084

Open
@profandyfield

Description

@profandyfield

With regressionBF, if I inspect a model directly I get

require(discovr)
require(BayesFactor)

album_tib <- discovr::album_sales
album_bf <- BayesFactor::regressionBF(sales ~ adverts + airplay + image, rscaleCont = "medium", data = album_tib)
album_bf


  |==================================================================================================| 100%
Bayes factor analysis
--------------
[1] adverts                   : 1.320123e+16 ±0%
[2] airplay                   : 4.723817e+17 ±0.01%
[3] image                     : 6039.289     ±0%
[4] adverts + airplay         : 5.65038e+39  ±0%
[5] adverts + image           : 2.65494e+20  ±0%
[6] airplay + image           : 1.034464e+20 ±0%
[7] adverts + airplay + image : 7.746101e+42 ±0%

Against denominator:
  Intercept only 
---
Bayes factor type: BFlinearModel, JZS

but with model_parameters(album_bf) I get:

model_parameters(album_bf)


Multiple `BFBayesFactor` models detected - posteriors are extracted from the first numerator
  model.
  See help("get_parameters", package = "insight").
# Extra Parameters 

Parameter |  Median |             95% CI |   pd |       BF
----------------------------------------------------------
mu        |  193.03 | [ 183.63,  202.51] | 100% | 1.32e+16
adverts   |    0.09 | [   0.08,    0.11] | 100% | 4.72e+17
sig2      | 4389.28 | [3629.69, 5366.11] | 100% | 6.04e+03
g         |    0.42 | [   0.08,   12.32] | 100% | 5.65e+39

# Fixed Effects 

Parameter |       BF
--------------------
adverts   | 2.65e+20
airplay   | 1.03e+20
image     | 7.75e+42

The values in column BF map onto the output of album_bf but the labels in Parameter do not. Am I misunderstanding the labels, or is model_parameters() mis-labelling? [For the record I'm using model_parameters() to get nice output and because I want students to learn a consistent workflow with all models.]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛Something isn't workingEnhancement 💥Implemented features can be improved or revisedLow priority 😴This issue does not impact package functionality much

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions