bayesplain.priors.EffectSizePrior

class bayesplain.priors.EffectSizePrior(scale, name='custom', rationale='')[source]

A Cauchy prior on standardised effect size, for means and correlations.

This one behaves differently from the other two, and the difference is worth stating plainly wherever it appears: it does not touch the estimate. The posterior for a mean uses the standard reference prior and is fixed by the data alone. This prior enters only the Bayes factor, where it says how large an effect you would expect if there is one.

That makes the means analyses a clean demonstration of the package’s main claim. Vary this prior across its whole range and the credible interval does not move by a single digit, while the Bayes factor moves substantially – because one is locating a value and the other is grading the evidence for a model.

Variables:
scale : float

Width of the Cauchy. Larger values spread prior mass over bigger effects, which costs the alternative when the observed effect is small.

name : str

Short label used in printed output.

rationale : str

Plain-English statement of what this assumption commits you to.

Methods

dist()

Return the prior on standardised effect size as a frozen scipy dist.

dist()[source]

Return the prior on standardised effect size as a frozen scipy dist.

Note this lives on the standardised scale, not the scale of the data, so it cannot be overlaid directly on a posterior for a difference in dollars or minutes. Plotting code treats it accordingly.

property label[source]

Name and parameter together, for printing in a summary table.

name = 'custom'[source]
rationale = ''[source]
scale[source]