bayes.factor.function | R Documentation |
Computes the Bayes factor in support of a streaky model over a consistent model for a range of parameter values for the streaky model.
bayes.factor.function(d, log.K = seq(1, 7, by = 0.1), plot = FALSE)
d |
vector of binary outcomes (0's and 1's) |
log.K |
range of values of log(K) under the streaky model |
plot |
if TRUE, will construct a plot of the log Bayes factor |
a list with components
log.K |
vector of values of log(K) |
log.BF |
vector of values of log(Bayes Factor) |
max.log.BF |
maximum value of the log Bayes Factor |
max.log.K |
value of log(K) where maximum is achieved |
Jim Albert
Albert, J. (2013), Looking at Spacings to Access Streakiness, Journal of Quantitative Analysis of Sports, Vol 9, Issue 2, 151-163.
y <- c(0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0) bayes.factor.function(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.