taste_type_demand_share#
- pymc_marketing.customer_choice.taste_profiles.taste_type_demand_share(model, n_samples=200, threshold=1.0)[source]#
Share of inside-good demand contributed by each price-taste bucket.
Consumer types are split into three buckets by their price taste shock \(\nu_{\mathrm{price}}\):
sensitive: \(\nu < -\mathrm{threshold}\)modal: \(-\mathrm{threshold} \le \nu \le \mathrm{threshold}\)insensitive: \(\nu > \mathrm{threshold}\)
With
threshold=1.0the population baseline (under a flat logit) is{0.16, 0.68, 0.16}.- Parameters:
- Returns:
pd.DataFrameColumns:
market, avg_price, sensitive_pct, modal_pct, insensitive_pct. One row per market. The three*_pctcolumns sum to 1.0 per row.
- Raises:
ValueErrorIf
thresholdis not strictly positive, or if the model has no random coefficient on price (the buckets are defined on the price taste shock).