bayesplain.priors.resolve_table

bayesplain.priors.resolve_table(prior)[source]

Turn whatever the user passed as prior= into a ConcentrationPrior.

Accepts a preset name, a positive number, an existing ConcentrationPrior, or None for the default. A BetaPrior is also accepted when its two shapes are equal, so that the same prior= argument can be handed to a proportion analysis and a table analysis and mean the same thing.

Parameters:
prior : str, float, ConcentrationPrior, BetaPrior, or None

The prior specification. None resolves to "uninformed".

Returns:

The resolved prior.

Return type:

ConcentrationPrior

Raises:

ValueError – If a name is not a known preset, or a BetaPrior with unequal shapes is given, since that has no symmetric table equivalent.