bayes.factor.function: Computes Bayes Factors for Range of Alternatives

bayes.factor.functionR Documentation

Computes Bayes Factors for Range of Alternatives

Description

Computes the Bayes factor in support of a streaky model over a consistent model for a range of parameter values for the streaky model.

Usage

bayes.factor.function(d, log.K = seq(1, 7, by = 0.1), plot = FALSE)

Arguments

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

Value

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

Author(s)

Jim Albert

References

Albert, J. (2013), Looking at Spacings to Access Streakiness, Journal of Quantitative Analysis of Sports, Vol 9, Issue 2, 151-163.

Examples

y <- c(0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0)
bayes.factor.function(y)

bayesball/BayesTestStreak documentation built on Dec. 15, 2022, 11:36 a.m.