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_scaleand{output_var}_original_scale.The counterfactual
exp(mu) - exp(mu - media)is a median-scale delta for whatever variable the likelihood putsmuon. Under aCensored(LogNormal)likelihood that is the latent uncensored variable, so the result describes unconstrained demand rather than the observed clipped response. Note thatLogLinkSpec.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.