bayesplain.core.correlation.log_bayes_factor

bayesplain.core.correlation.log_bayes_factor(r, n, kappa=1.0, points=1201)[source]

Log Bayes factor for a real correlation against no correlation.

Parameters:
r : float

Observed correlation.

n : int

Number of pairs.

kappa : float, default 1.0

Prior width. Wider priors weaken the evidence for a small observed correlation.

points : int, default 1201

Grid resolution for the marginal-likelihood integral.

Returns:

log(BF10). Positive favours a relationship; negative favours none.

Return type:

float