Last chance! 50% off unlimited learning
Sale ends in
The BFBayesFactor
class is a general S4 class for representing models model comparison via Bayes factor.
# S4 method for numeric,BFBayesFactor
/(e1, e2)# S4 method for BFBayesFactor,BFBayesFactor
/(e1, e2)
# S4 method for BFBayesFactor,index,missing,missing
[(x, i, j, ..., drop = TRUE)
# S4 method for BFBayesFactor
t(x)
# S4 method for BFBayesFactor
which.max(x)
# S4 method for BFBayesFactor
which.min(x)
# S4 method for BFBayesFactor
is.na(x)
# S4 method for BFBayesFactor,BFodds
*(e1, e2)
# S4 method for BFBayesFactorTop,index,missing,missing
[(x, i, j, ...,
drop = TRUE)
Numerator of the ratio
Denominator of the ratio
BFBayesFactor object
indices indicating elements to extract
unused for BFBayesFactor objects
further arguments passed to related methods
unused
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.
a list of models all inheriting BFmodel
, each providing a single denominator
a single BFmodel
object serving as the denominator for all model comparisons
a data frame containing information about the comparison between each numerator and the denominator
a data frame containing the data used for the comparison
character string giving the version and revision number of the package that the model was created in
# NOT RUN {
## 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)
# }
Run the code above in your browser using DataLab