-
I am not sure if I am doing something wrong, but I think the following analyses should result in the same BF calculated with the
However, the results are noticeably different, such that BF_BayestesterR = 6.282 and BF_BayesFactor = 2.108712. The BFs are also not identical if I use a point Null:
Here, BF_BayestesterR = 16.058 and BF_BayesFactor = 17.25888. This is obviously much closer. Did I miss something that makes that the piors for the two analysis are not the same? Any hint is very much appreciated. I'll also post this Issue at https://github.com/richarddmorey/BayesFactor/issues. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 14 replies
-
Hi @gbiele, This isn't really an issue with This all has to do with Stan (via Just to give an example:
(There are many many other differences - how estimation of sigma is done, how random effects are treated... etc.) In other words, this isn't a bug - just different flavors of priors. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
hi @mattansb, first thanks for the extremely fast response! So rstanarm will scale the prior even though the prior is defined by I'l try to look more into how the error variance is estimated in BayesFactor and see if I can set Or were you implying that it won't be possible to set up an rstanmodel that matches what BayesFactor does? I am aware that priors have an undesirably large effect on BF, but I am surprised how large the differences became when I played a bit around with other d. |
Beta Was this translation helpful? Give feedback.
-
Here richarddmorey/BayesFactor#156 Richard Morey shows that the key thing I did not recognize was that if one uses |
Beta Was this translation helpful? Give feedback.
-
Thanks for the various comments.
Surely both the “Bayes Factor” vignette and the help page for bayesfactor_parameters() should,
when they give an example, explicitly give the 1,000 samples * 4 chains parameters when the
model is specified. As it is, for anyone not familiar with rstanarm and bayestestR, these are not
easy to chase down.
Also, it would be useful to provide a warning in cases where the Bayes factor estimate is highly
unstable. The estimate might be checked against the upper limit given in the Sellke at al 2001
American Statistician paper (~22.4 for p=0.0028 as in the paired differences p-value for the
sleep data); the BayesFactor::ttestBF() value of 17.26 is consistent with this. Values that are
widely different at the lower end might also be flagged. Also, encourage users to run the
calculations more than once.
The publishers have now, after stalling for quite a time on going ahead with a 4th end of my
book with John Braun “Data Analysis and Graphics Using R”, indicated that they wish to proceed.
One last-minute inclusion comments briefly on the Bayes Factor connection to t-tests that go
beyond highlighting the implications of the Sellke et al result. Our stance is pretty much an
acceptance that p-values will rule for a while yet — but please understand that they do not have
many of the implications that are commonly given to them. It is well to point out that different
priors will give different Bayes Factors, but wildly different Bayes Factors that result from the way
that the prior/posterior are sampled risk encouraging a “you can prove anything with statistics”
mentality.
… On 3/10/2021, at 23:00, Mattan S. Ben-Shachar ***@***.***> wrote:
|
Beta Was this translation helpful? Give feedback.
Hi @gbiele,
This isn't really an issue with
bayestestR
, but has to do with differences betweenrstanarm
andBayesFactor
.I will try to give the gist nonetheless (:
This all has to do with Stan (via
rstanarm
, orbrms
) using a very different parameterization thanBayesFactor
.Just to give an example:
rstanarm
the priors are scaled, but they are scaled by SDy = the unconditional SD of y.BayesFactor
the prios are also scaled, but they are scaled by σy = the conditional SD of y.(There are many many other differences - how estimation of sigma is done, how random effects are treated... etc.)
In other words, this isn't a bug - just different flavors of priors.
Hope this helps!