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.0 the population baseline (under a flat logit) is {0.16, 0.68, 0.16}.

Parameters:
modelBayesianBLP

A fitted model.

n_samplesint

Number of posterior draws.

thresholdfloat

Boundary used to split the \(\nu\) axis. Must be positive.

Returns:
pd.DataFrame

Columns: market, avg_price, sensitive_pct, modal_pct, insensitive_pct. One row per market. The three *_pct columns sum to 1.0 per row.

Raises:
ValueError

If threshold is not strictly positive, or if the model has no random coefficient on price (the buckets are defined on the price taste shock).