The `BFBayesFactor`

class is a general S4 class for
representing models model comparison via Bayes factor.

`BFBayesFactor`

objects can be inverted by taking
the reciprocal and can be divided by one another,
provided both objects have the same denominator. In
addition, the `t`

(transpose) method can be used to
invert Bayes factor objects.

The
`BFBayesFactor`

class has the following slots
defined:

- numerator
a list of models all inheriting

`BFmodel`

, each providing a single denominator- denominator
a single

`BFmodel`

object serving as the denominator for all model comparisons- bayesFactor
a data frame containing information about the comparison between each numerator and the denominator

- data
a data frame containing the data used for the comparison

- version
character string giving the version and revision number of the package that the model was created in

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
## Compute some Bayes factors to demonstrate division and indexing
data(puzzles)
bfs <- anovaBF(RT ~ shape*color + ID, data = puzzles, whichRandom = "ID", progress=FALSE)
## First and second models can be separated; they remain BFBayesFactor objects
b1 = bfs[1]
b2 = bfs[2]
b1
## We can invert them, or divide them to obtain new model comparisons
1/b1
b1 / b2
## Use transpose to create a BFBayesFactorList
t(bfs)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.