Research
- Crime Categories
- Murder Circumstances
- Charges
- Murder Numbers by SHR
- Definitions of Murder
- Crime Literature
- Other Literature
- Seminars
- Journal Ranking
- Laws
- Changes in Law and Reporting in Michigan
- Citation Guides
- Datasets
Writing
Methods
- BLP
- Econometrics Models
- Econometrics Tests
- Econometrics Resources
- Event Study Plots
- Metrics Literature
- Machine Learning
Python-related
- Python Basic Commands
- Pandas Imports and Exports
- Pandas Basic Commands
- Plotting in Python
- Python web scraping sample page
- Two Sample t Test in Python
- Modeling in Python
R-related
- R Basics
- R Statistics Basics
- RStudio Basics
- R Graphics
- R Programming
- Accessing MySQL Databases from R
Latex-related
Stata-related
SQL
Github
Linux-related
Conda-related
AWS-related
Webscraping
Interview Prep
Other
BLP
Table of content
- The consumer decision
- Market shares and elasticities in the BLP model
- Combining Logit and GMM
- BLP steps
Sources: Vincent 2015, Rasmusen 2020
The consumer decision
The utility of consumer \(i\) if he were to buy product \(j\) in town \(t\) is given by:
\[u_{ijt} = \alpha_i(y_i - p_{jt}) + \mathbf{x_{jt}\beta_i} + \xi_{jt} + \epsilon_{ijt}\]where \(i\) = 1,…,400, \(j\) = 1,…,50, \(t\) = 1,…,20.
\(y_i\): income of consumer \(i\)
\(p_{jt}\): observed price of product \(j\) in town \(t\)
\(x_{jt}\): 6-dimentional vector of observed characteristics of product \(j\) in town \(t\)
\(\xi_{jt}\): disturbance scalar summarizing unobserved characteristics of product \(j\) in town \(t\)
\(\epsilon_{ijt}\): usual unobserved disturbance with mean zero
Parameters to be estimated are consumer \(i\)’s marginal utility of income, \(\alpha_i\), and his marginal utility of product characteristics, the 6-vector \(\mathbf{\beta_i}\).
These parameters are functions of the average values across consumers, consumers’ observable characteristics, and consumers’ unobservable characteristics.
\[\begin{pmatrix} \alpha_i \\ \boldsymbol{\beta}_i \end{pmatrix} = \begin{pmatrix} \alpha \\ \boldsymbol{\beta} \end{pmatrix} + \boldsymbol{\Pi}\boldsymbol{D_i} + \boldsymbol{\Sigma}\boldsymbol{\nu_i} \\ = \begin{pmatrix} \alpha \\ \boldsymbol{\beta} \end{pmatrix} + \begin{pmatrix} \boldsymbol{\Pi}_\alpha \\ \boldsymbol{\Pi_\beta} \end{pmatrix}\boldsymbol{D_i} + \begin{pmatrix} \boldsymbol{\Sigma}_\alpha \\ \boldsymbol{\Sigma_\beta} \end{pmatrix} (\boldsymbol{\nu}_{i\alpha},\boldsymbol{\nu}_{i\boldsymbol{\beta}})\]where \(D_i\) is a 4 x 1 vector of consumer \(i\)’s observable characteristics, \(\boldsymbol{\nu}_i\) is a 7 x 1 vector of the effect of consumer \(i\)’s unobservable characteristics on his \(\alpha_i\) and \(\boldsymbol{\beta}_i\) parameters; \(\boldsymbol{\Pi}\) is a 7 x 4 matrix of how parameters (the \(\alpha_i\) and the 6 elements of \(\boldsymbol{\beta}_i\)) depend on consumer observables, \(\boldsymbol{\Sigma}\) is a 7 x 7 matrix of how those 7 parameters depend on the unobservables, and \((\boldsymbol{\nu}_{i\alpha},\boldsymbol{\nu}_{i\boldsymbol{\beta}})\), \((\boldsymbol{\Pi}_{i\alpha},\boldsymbol{\Pi}_{i\boldsymbol{\beta}})\), and \((\boldsymbol{\Sigma}_{i\alpha},\boldsymbol{\Sigma}_{i\boldsymbol{\beta}})\) just split each vector or matrix into two parts.
Substitute the function for consumer characteristics into the utility function, I get
\[\begin{align} u_{ijt} &= \alpha_i(y_i - p_{jt}) + \boldsymbol{x_{jt}\beta_i} + \xi_{jt} + \epsilon_{ijt} \\ &= \alpha_i y_i + (-\alpha p_{jt} + \boldsymbol{x_{jt} \beta} + \xi_{jt}) + (-p_{jt}, \boldsymbol{x_{jt}}) (\boldsymbol{\Pi} \boldsymbol{D_i} + \boldsymbol{\Sigma}\boldsymbol{\nu_i}) + \epsilon_{ijt} \\ &= \alpha_i y_i + \delta_{jt} + \mu_{ijt} + \epsilon_{ijt} \end{align}\]\(\alpha_i y_i\) is the utility from income. It drops out because it plays no part in the consumer’s choice.
\(\delta_{jt}\) is the “mean utility,” which is the component of utility from a consumer’s choice of product \(j\) that is the same across all consumers. \(\delta_{jt} \equiv (-\alpha p_{jt} + \boldsymbol{x_{jt} \beta} + \xi_{jt})\)
\(\mu_{ijt}\) is the heteroskedastic disturbance and \(\epsilon_{ijt}\) is the homoskedastic i.i.d. disturbance. \(\mu_{ijt} \equiv (-p_{jt}, \boldsymbol{x_{jt}}) (\boldsymbol{\Pi} \boldsymbol{D_i} + \boldsymbol{\Sigma}\boldsymbol{\nu_i})\).
Market shares and elasticities in the BLP model
If we use the Type I extreme value distribution for \(\epsilon_{ijt}\), then the market share of product \(j\) for a consumer of type \(i\) turns out to be
\[s_{ijt} = \frac{e^{\delta_{jt} + \mu_{ijt}}}{1 + \Sigma^{50}_{k=1} e^{\delta_{kt} + \mu_{ikt}}}\]The overall market share of product \(j\) in town \(t\) is found by integrating the market shares picked by each consumer above across the individual types, weighting each type by its probability in the population:
\[\begin{align} s_{jt} &= \int_{\nu} \int_{D} [\frac{e^{\delta_{jt} + \mu_{ijt}}}{1 + \Sigma^{50}_{k=1} e^{\delta_{kt} + \mu_{ikt}}}] \boldsymbol{d \hat{P}^*_D(D) d P^*_{\nu}(\nu)} \\ &= \int_{\nu} \int_{D} s_{ijt} \boldsymbol{d \hat{P}^*_D(D) d P^*_{\nu}(\nu)} \tag{5}\label{eq:pp} \end{align}\]The above equation adds up the market shares of different types \(i\) of consumers based on how common that type \(i\) is in town \(t\).
The price elasticity of the market share of product \(j\) with respect to the price of product \(k\) is
\[\begin{align} \eta_{jkt} &\equiv \frac{\partial s_{jt}}{\partial p_{kt}} \cdot \frac{p_{kt}}{s_{jt}} \\ &= \begin{cases} - \frac{p_{jt}}{s_{jt}} \int_{\boldsymbol{\nu}} \int_{\boldsymbol{D}} \alpha_i s_{ijt} (1-s_{ijt})\boldsymbol{d \hat{P}^*_D (D) d P^*_{\nu}(\nu)} & if j=k \\ \frac{p_{kt}}{s_{jt}} \int_{\boldsymbol{\nu}} \int_{\boldsymbol{D}} \alpha_i s_{ijt} s_{ikt} \boldsymbol{d \hat{P}^*_D (D) d P^*_{\nu}(\nu)} & otherwise. \end{cases} \end{align}\]This is hard to estimate, and the difficulty comes from the integrals in Equation \ref{eq:pp}. Usually these need to be calculated by simulation, starting with our real-world knowledge of the distribution of consumer types \(i\) in a given town \(t\) and the characteristics of product \(j\), and combining that with estimates of how different consumer types value different product characteristics.
This suggests that we might begin with an initial set of parameter estimates, calculate what market shares that generates for each town, see how those match the observed market shares, and then pick a new set of parameter estimates to try to get a closer match.
Also, we need to take into account endogeneity between price and quantity. In comes GMM.
Combining Logit and GMM
If our assumption on the population is that
\[\boldsymbol{E(Z_m \omega(\theta*))} =0, \text{ m=1,...,M}\]then the GMM estimator is
\[\hat{\boldsymbol{\theta}} = argmin_{\boldsymbol{\theta}} \boldsymbol{\omega(\theta)'Z\Phi^{-1}Z'\omega(\theta)}\]where \(\boldsymbol{\Phi}\) is a consistent estimator of \(\boldsymbol{E(Z'\omega \omega' Z)}\). The instrument matrix \(\boldsymbol{Z}\) consists both of single-variable instruments and multi-variable instruments consisting of squares and interactions of the single variables.
BLP steps
(-1) Select arbitrary values for \(\boldsymbol{\delta}\) and \(\boldsymbol{(\Pi, \Sigma)}\) (for step (1)) and for \((\alpha, \boldsymbol{\beta})\) (for step (3)) as starting points.
(0) Draw random values for \((\boldsymbol{\nu_i, D_i})\) for \(i = 1,...n_s\) from the distributions \(\boldsymbol{P^*_{\nu}(\nu)}\) and \(\boldsymbol{\hat{P}^*_D(D)}\) for a sample of size \(n_s\), where the bigger you pick \(n_s\), the more accurate your estimate will be.
(1) Using the starting values and the random values, and using the assumption that the \(\epsilon_{ijt}\) follow the extreme-value distribution, approximate the integral for market share that results from aggregating across \(i\) by
\[\begin{align} s_{jt} &= (\frac{1}{n_s}) \sum^{n_s}_{i=1} s_{ijt} \\ &= (\frac{1}{n_s})\sum^{n_s}_{i=1} \begin{bmatrix} \frac{e^{\begin{bmatrix}\delta_{jt}+\sum^6_{k=1}x^k_{jt}(\delta_k \nu^k_i + \pi_{k1} D_{i1} + ... + \pi_{k4} D_{i4})\end{bmatrix}}}{1 + \sum^{50}_{m=1} e^{\begin{bmatrix}\delta_{mt}+\sum^{6}_{k=1}x^k_{mt}(\delta_k\nu^k_i+\pi_{k1}D_{i1}+...+\pi_{k4}D{i4})\end{bmatrix}}} \end{bmatrix} \end{align}\]where \((\nu^1_i,...,\nu^6_i)\) and \((D_{i1},...,D_{i4})\) for \(i=1,...n_s\) are those random draws from the previous step.
Thus in step (1) we obtain predicted market shares for given values of the individual consumer parameters \((\boldsymbol{\Pi, \Sigma})\) and for given values of the mean utilities \(\boldsymbol{\delta}\).
(2) Use the following contraction mapping, keeping \((\boldsymbol{\Pi, \Sigma})\) fixed at their starting points, find values of \(\boldsymbol{\delta}\) by the following iterative process
\[\boldsymbol{\delta}^{h+1}_{\cdot t} = \boldsymbol{\delta}^h_{\cdot t} + (\boldsymbol{ln(S_{\cdot t}) - ln(s_{\cdot t})})\]where \(S_{\cdot t}\) is the observed market share, and \(s_{\cdot t}\) is the predicted market share from step (1) that uses \(\boldsymbol{\delta}^{h+1}_{\cdot t}\) as its starting point. Start with the arbitrary \(\boldsymbol{\delta^0}\) of step (-1).
If the observed and predicted market shares are equal, then \(\boldsymbol{\delta}^{h+1}_{\cdot t} = \boldsymbol{\delta}^h_{\cdot t}\) and the series has converged. In practice, keep iterating until \(\boldsymbol{ln(S_{\cdot t}) - ln(s_{\cdot t})}\) is small enough for you to be satisfied with its accuracy.
Thus, in step (2) we come out with values for \(\boldsymbol{\delta}\).
(3) Figure out the value of the moment expression, using the starting values for \((\alpha, \boldsymbol{\beta})\) from step (0) and the \(\boldsymbol{\delta}\) estimate from step (2).
(3a) Calculate the error term \(\boldsymbol{\omega}_{jt}\).
\[\boldsymbol{\omega}_{jt} = \boldsymbol{\delta}_{jt} - (-\alpha \boldsymbol{p_{jt}} + \boldsymbol{x_{jt}\beta})\tag{11}\label{eq:et}\](3b) Calculate the value of the moment expression,
\[\boldsymbol{\omega'Z\Phi^{-1}Z'\omega} \tag{12} \label{eq:me}\]\(\Phi^{-1} = (Z'Z)^{-1}\) as the starting point until step (4c).
(4) Compute better estimates of all the parameters: the common parameters \((\alpha,\boldsymbol{\beta})\), the individual parameters \((\boldsymbol{\Pi, \Sigma})\), and the weighting matrix \(\Phi\).
(4a) Find an estimate of the parameters that are common to all consumers, \((\alpha,\boldsymbol{\beta})\), using the GMM estimator
\[(\hat{\alpha},\hat{\boldsymbol{\beta}}) = \boldsymbol{(X'Z\Phi_{-1}Z'X)^{-1}X'Z\Phi^{-1}Z'\delta} \tag{13} \label{eq:ep}\](4b) Estimate the value of the error term in Equation \ref{eq:et}, \(\hat{\boldsymbol{\omega}}\) and then the moment expression in Equation \ref{eq:me}, using the improved estimates of \((\alpha,\boldsymbol{\beta})\) from Equation \ref{eq:ep}.
(4c) Estimate the value of the weighting matrix \(\boldsymbol{\Phi = Z'\omega \omega' Z}\) using the \(\hat{\boldsymbol{\omega}}\) just calculated.
\[\hat{\boldsymbol{\omega}}_{jt} = \boldsymbol{\delta}_{jt} - (-\hat{\alpha} \boldsymbol{p_{jt}} + \boldsymbol{x_{jt}\hat{\beta}})\](4d) Use a search algorithm to find new values for \(\boldsymbol{(\Pi, \Sigma)}\). Take the new values and return to step (1). Keep iterating, searching for parameter estimates that minimize the moment expression \ref{eq:me}, until the value of the moment expression is close enough to zero.