Some useful R code (pt 2)
Hi all,
I've wrapped some custom functions I use in R alongside BayesFactor into a mini-package that you can find here>>.
The package includes the following functions:
inclusionBFto compute inclusion BFs (an R implementation of what can be found in JASP - produces identical results).inferBFto test followup hypothesis based on the posteriors estimates, such as order restriction (based on Richard's posts, and point tests (which produces Savage-Dickey density ratio bayes factors, see discussion here). This is meant to be the step brother ofbrms::hypothesis.BIC_BFsto compare models based on the BIC - > BF method (the returned object can then be sent toinclusionBF).
Would love any feedback (everything seems to work... but having other people test / code review is optimal - then might send this to CRAN?).
Hope you find this useful!
Comments
Seems like (as an unintended side effect)
inferBFalso enables ROPE analysis.