Another option (aside from pm.Potential, which will work great) is to use pm.CustomDist. It’s the successor to pm.DensityDist, and would be written:
sales = pm.CustomDist('sales', mu, p, phi, logp=tweedie_logp, observed=sales_observed)
Another option (aside from pm.Potential, which will work great) is to use pm.CustomDist. It’s the successor to pm.DensityDist, and would be written:
sales = pm.CustomDist('sales', mu, p, phi, logp=tweedie_logp, observed=sales_observed)