## Sample from the posteriors for two models
data(sleep)
bf = lmBF(extra ~ group + ID, data = sleep, whichRandom="ID", progress=FALSE)
## sample from the posterior of the numerator model
## data argument not needed - it is included in the Bayes factor object
chains = posterior(bf, iterations = 1000, progress = FALSE)
plot(chains)
## demonstrate column filtering by filtering out participant effects
data(puzzles)
bf = lmBF(RT ~ shape + color + shape:color + ID, data=puzzles)
chains = posterior(bf, iterations = 1000, progress = FALSE, columnFilter="^ID$")
colnames(chains) # Contains no participant effects
Run the code above in your browser using DataLab