“Observed Heterogeneity”
“Unobserved Heterogeneity”
| Parameter | Estimate | Standard Error |
|---|---|---|
| \(\mu_1\) | 0.1 | 0.01 |
| \(\sigma_1\) | 0.1 | 0.01 |
Normal distribution
When preferences can be positive or negative
e.g. brand = "n"

Log-normal distribution
When preferences should be strictly positive
e.g. -1*price = "ln"

Fixed parameter
When preferences appear to be homogeneous
(e.g. \(\sigma\) is very small)

logitr package to estimate the following homogeneous model:\[ \tilde{u}_j = \beta_1 x_j^{\mathrm{price}} + \beta_2 \delta_j^{\mathrm{feat}} + \beta_3 \delta_j^{\mathrm{dannon}} + \beta_4 \delta_j^{\mathrm{hiland}} + \beta_5 \delta_j^{\mathrm{weight}} + \varepsilon_j \]
where the three \(\delta\) coefficients are dummy variables for Dannon, Hiland, and Weight Watchers brands (Yoplait is the reference level).
logitr package to estimate the same model but with the following mixing distributions:logitrlogitr-cars
code/8.1-model-mxl.R
As a team, re-estimate the main model you used in your pilot analysis report, but now using a mixed logit model.
Carefully consider which distributions to use (i.e., normal or log-normal) for different variables.
“Observed Heterogeneity”
“Unobserved Heterogeneity”
| Par. | Meaning |
|---|---|
| \(\beta_1\) | Effect of \(x_j\) for group A |
| \(\beta_2\) | Difference in effect of \(x_j\) between groups |
\[ \tilde{u}_j^\mathrm{A} = \beta_1^\mathrm{A} x_j + \varepsilon_j^\mathrm{A} \]
\[ \tilde{u}_j^\mathrm{B} = \beta_1^\mathrm{B} x_j + \varepsilon_j^\mathrm{B} \]
\[\tilde{u}_j = \beta_1 x_j + \beta_2 x_j \delta^\mathrm{B} + \varepsilon_j\]
\[ \tilde{u}_j^\mathrm{A} = \alpha^\mathrm{A} p_j + \beta_1^\mathrm{A} x_j + \varepsilon_j^\mathrm{A} \]
\[ \tilde{u}_j^\mathrm{B} = \alpha^\mathrm{B} p_j + \beta_1^\mathrm{B} x_j + \varepsilon_j^\mathrm{B} \]
Imagine you got the following results
\[\tilde{u}_j = \alpha_1 p_j + \alpha_2 p_j \delta^\mathrm{B} + \beta_1 x_j + \beta_2 x_j \delta^\mathrm{B} + \varepsilon_j\]
\[\quad = (\alpha_1 + \alpha_2 \delta^\mathrm{B}) p_j + (\beta_1 + \beta_2 \delta^\mathrm{B}) x_j + \varepsilon_j\]
\[ \tilde{u}_j^\mathrm{A} = \alpha^\mathrm{A} p_j + \beta_1^\mathrm{A} x_j + \varepsilon_j^\mathrm{A} \]
\[ \tilde{u}_j^\mathrm{B} = \alpha^\mathrm{B} p_j + \beta_1^\mathrm{B} x_j + \varepsilon_j^\mathrm{B} \]
Imagine you got the following results
\[ \tilde{u}_j^\mathrm{A} = \lambda^\mathrm{A}(\omega_1^\mathrm{A} x_j - p) + \varepsilon_j^\mathrm{A} \]
\[ \tilde{u}_j^\mathrm{B} = \lambda^\mathrm{B}(\omega_1^\mathrm{B} x_j - p) + \varepsilon_j^\mathrm{B} \]
\[ \omega = \frac{\beta}{- \alpha} \]
Suppose we estimate the following utility model describing preferences for cars:
\[ \tilde{u}_j = \beta_1 x_j^{\mathrm{price}} + \beta_2 x_j^{\mathrm{mpg}} + \beta_3 x_j^{\mathrm{elec}} + \varepsilon_j \]
Using interactions, write out a model that accounts for differences in the effects of \(x_j^{\mathrm{price}}\), \(x_j^{\mathrm{mpg}}\), and \(x_j^{\mathrm{elec}}\) between two groups: A and B.
Write out the effects of \(x_j^{\mathrm{price}}\), \(x_j^{\mathrm{mpg}}\), and \(x_j^{\mathrm{elec}}\) for each group.
Suppose we estimate the following utility model describing preferences for chocolate bars between two groups: A & B
\[ \tilde{u}_j = \beta_1 x_j^{\mathrm{price}} + \beta_2 x_j^{\mathrm{caco}} + \beta_3 x_j^{\mathrm{price}}\delta_j^{\mathrm{B}} + \beta_4 x_j^{\mathrm{cacao}}\delta_j^{\mathrm{B}} + \varepsilon_j \]
The estimated model produces the following coefficients and hessian:
\(\beta\) = [-0.7, 0.1, 0.2, 0.8]
\[ H = \begin{bmatrix} -6000 & 50 & 60 & 70 \\ 50 & -700 & 50 & 100 \\ 60 & 50 & -300 & 20 \\ 70 & 100 & 20 & -6000 \end{bmatrix} \]
Use the mvrnorm() function from the MASS library to generate 10,000 draws of the model coefficients.
Use the draws to compute the mean WTP and 95% confidence intervals of the effects of \(x_j^{\mathrm{price}}\) and \(x_j^{\mathrm{cacao}}\) for each group (A & B).
logitrlogitr-carscode/8.2-mnl-groups.RA market simulation gives you one predicted share for one market.
The next question your client will ask:
“How much does that share change if we change our product?”
predict() and see how your product’s share movesRe-predict your product’s share across a range of prices
Market share vs. price
Revenue vs. price (price x share x market size)
Move each attribute by a fixed amount (e.g. +/- 20%) in the direction that raises (“high”) and lowers (“low”) your share
Tornado plot
Solid line = prices included in the survey; dashed = extrapolation beyond that range

logitrlogitr-cars
code/9.1-compute-sensitivity.R
code/9.2-plot-sensitivity.R
These charts belong in your Final Analysis report.
Think about what makes a good baseline market for your project.