LogLinkSpec.create_media_contribution_deterministic#

LogLinkSpec.create_media_contribution_deterministic(mu_var, channel_contribution, target_scale, output_var='y')[source]#

Register counterfactual total_media_contribution_original_scale and {output_var}_original_scale.

The counterfactual exp(mu) - exp(mu - media) is a median-scale delta for whatever variable the likelihood puts mu on. Under a Censored(LogNormal) likelihood that is the latent uncensored variable, so the result describes unconstrained demand rather than the observed clipped response. Note that LogLinkSpec.validate_target() rejects any non-positive target, so the zero-inflated data that left-censoring at zero is meant for cannot be fitted under this link at all.