IdentityLinkSpec.validate_likelihood_compatibility#
- static IdentityLinkSpec.validate_likelihood_compatibility(link, likelihood)[source]#
Raise if likelihood is incompatible with link.
The identity link is compatible with any likelihood because the additive decomposition does not depend on the distributional form. The log link requires LogNormal so that the counterfactual decomposition (
exp(mu) - exp(mu - media)) is correct.- Parameters:
- link
LinkFunction The link function used by the model.
- likelihood
Prior The likelihood distribution prior.
- link
- Raises:
ValueErrorIf the combination is known to produce incorrect downstream decomposition or optimisation results.