20. A Minimal Numerical Walkthrough of the BLP Estimation Process

20. A Minimal Numerical Walkthrough of the BLP Estimation Process

Settings

  1. Market: 1 market, 3 products ($J=3$) plus an outside option ($j=0$)
  1. Random Coefficients: $K=2$ (constant $\beta_0$, price sensitivity $\alpha$)
  1. Simulated Consumers: $ns=3$, draws fixed throughout estimation
  1. Product Characteristics ($X$): 1st column = constant, 2nd column = price. $$ X_{J \times K} = \begin{pmatrix} 1 & 2.0 \\ 1 & 3.0 \\ 1 & 4.0 \end{pmatrix} \tag{1} $$
  1. Observed Market Shares ($S$): Outside good share $S_0 = 0.30$. $$S_{J \times 1} = \begin{pmatrix} 0.30 \\ 0.25 \\ 0.15 \end{pmatrix} \tag{2} $$
  1. Standard Normal Draws ($V$): Pre-drawn and held fixed. $$ V_{K \times ns} = \begin{pmatrix} 0.5 & -1.0 & 0.8 \\ -0.7 & 0.4 & 1.2 \end{pmatrix} \tag{3} $$
  1. Initial Mean Utility ($\delta^{(0)}$): Logit inversion $\ln S_j - \ln S_0$.

Algorithm

Outer Loop: Non-Linear Optimization

The optimizer (e.g., BFGS) searches over the Cholesky factor $L$ of $\Sigma$ to guarantee positive semi-definiteness. Current proposal: $$
L_{K \times K} = \begin{pmatrix} 0.8 & 0 \\ 0.3 & 0.5 \end{pmatrix}
\quad\implies\quad
\Sigma_{K \times K} = LL' = \begin{pmatrix} 0.64 & 0.24 \\ 0.24 & 0.34 \end{pmatrix} \tag{5} $$

Step 1: Individual Taste Deviations ($\mu$)

Map standard normal draws through the proposed covariance structure and interact with product characteristics.
  1. Scale the draws ($LV$, $\sigma v$): $$
LV = \begin{pmatrix} 0.8 & 0 \\ 0.3 & 0.5 \end{pmatrix}
\begin{pmatrix} 0.5 & -1.0 & 0.8 \\ -0.7 & 0.4 & 1.2 \end{pmatrix}
= \begin{pmatrix} 0.40 & -0.80 & 0.64 \\ -0.20 & -0.10 & 0.84 \end{pmatrix}_{K \times ns} \tag{6} $$
Consumer 1: +0.40 baseline preference shock, −0.20 price sensitivity shock (less price-sensitive than average). Consumer 3: +0.64 baseline, +0.84 price sensitivity (more price-sensitive).
  1. Compute deviations ($\mu = X(LV)$, $x \sigma v$): Rows = products, columns = consumers. $$
\mu = \begin{pmatrix} 1 & 2 \\ 1 & 3 \\ 1 & 4 \end{pmatrix}
\begin{pmatrix} 0.40 & -0.80 & 0.64 \\ -0.20 & -0.10 & 0.84 \end{pmatrix}
= \begin{pmatrix} 0.00 & -1.00 & 2.32 \\ -0.20 & -1.10 & 3.16 \\ -0.40 & -1.20 & 4.00 \end{pmatrix}_{J \times ns} \tag{7} $$

Step 2: Inner Loop (Contraction Mapping)

Solve for $\delta^*$ such that simulated shares equal observed shares.
  1. Individual utility ($U = \delta^{(0)}\mathbf{1}' + \mu$): $$
U_{J \times ns} = \begin{pmatrix} 0.00 & -1.00 & 2.32 \\ -0.382 & -1.282 & 2.978 \\ -1.093 & -1.893 & 3.307 \end{pmatrix} \tag{8} $$
  1. Choice probabilities ($s_{ij}$): Softmax per consumer; denominator includes outside option ($e^0 = 1$). $$\begin{aligned} \text{Consumer 1:}&\quad 1 + e^{0} + e^{-0.382} + e^{-1.093} = 3.018 \\ \text{Consumer 2:}&\quad 1 + e^{-1} + e^{-1.282} + e^{-1.893} = 1.796 \\ \text{Consumer 3:}&\quad 1 + e^{2.32} + e^{2.978} + e^{3.307} = 58.138 \end{aligned} \tag{9} $$
  1. Simulated market shares ($\hat{s}^{(0)}$): Average across consumers ($ns=3$). $$
\hat{s}^{(0)} = \frac{1}{3} \begin{pmatrix} 0.331+0.205+0.175 \\ 0.226+0.154+0.338 \\ 0.111+0.084+0.470 \end{pmatrix} = \begin{pmatrix} 0.237 \\ 0.239 \\ 0.222 \end{pmatrix}_{J \times 1} \tag{11} $$
  1. BLP contraction update: $\delta^{(n+1)} = \delta^{(n)} + \ln S - \ln \hat{s}^{(n)}$
$$ \begin{aligned} \delta^{(1)} &= \delta^{(0)} + \ln S - \ln \hat{s}^{(0)} \\
&= \begin{pmatrix} 0 \\ -0.182 \\ -0.693 \end{pmatrix} + \begin{pmatrix} \ln 0.30 \\ \ln 0.25 \\ \ln 0.15 \end{pmatrix} - \begin{pmatrix} \ln 0.237 \\ \ln 0.239 \\ \ln 0.222 \end{pmatrix} \\ &= \begin{pmatrix} 0.236 \\ -0.137 \\ -1.085 \end{pmatrix} \end{aligned} \tag{12} $$
  1. Convergence: Iterate until $\max|\delta^{(n+1)} - \delta^{(n)}| < 10^{-14}$. Assume: $$\delta^*_{J \times 1} \approx \begin{pmatrix} 0.31 \\ -0.09 \\ -1.24 \end{pmatrix} \tag{13}$$
See [[21. Contraction Mapping Theorem|the general contraction theorem]] and [[21+. BLP Contraction Mapping|its BLP application]] for more.

Step 3: IV Regression for Linear Parameters

With $\delta^*$ isolated, the model is structurally linear: $\delta^* = X\theta_1 + \xi$. IV estimates the mean parameters $\theta_1 = (\beta_0, \alpha)'$. *(Simplified: $Z = X$ for illustration, reducing IV to OLS.)* 1. Estimate $\hat{\theta}_1$:
1. The estimator is given by the standard projection matrix formula: $$\hat{\theta}_1 = (X'X)^{-1} X' \delta^* \tag{14}$$
2. Compute the Gram matrix $X'X$ and its inverse: $$X'X = \begin{pmatrix} 1 & 1 & 1 \\ 2 & 3 & 4 \end{pmatrix} \begin{pmatrix} 1 & 2 \\ 1 & 3 \\ 1 & 4 \end{pmatrix} = \begin{pmatrix} 3 & 9 \\ 9 & 29 \end{pmatrix} \tag{15}$$$$(X'X)^{-1} = \frac{1}{\det(X'X)} \begin{pmatrix} 29 & -9 \\ -9 & 3 \end{pmatrix} = \frac{1}{6} \begin{pmatrix} 29 & -9 \\ -9 & 3 \end{pmatrix} \tag{16}$$Compute the projection vector $X'\delta^*$: $$X'\delta^* = \begin{pmatrix} 1 & 1 & 1 \\ 2 & 3 & 4 \end{pmatrix} \begin{pmatrix} 0.31 \\ -0.09 \\ -1.24 \end{pmatrix} = \begin{pmatrix} -1.02 \\ -4.61 \end{pmatrix} \tag{17}$$Combine to find the parameter vector $\hat{\theta}_1$: $$\hat{\theta}_1 = \frac{1}{6} \begin{pmatrix} 29 & -9 \\ -9 & 3 \end{pmatrix} \begin{pmatrix} -1.02 \\ -4.61 \end{pmatrix} = \begin{pmatrix} 1.985 \\ -0.775 \end{pmatrix} \tag{18}$$
  1. Compute structural residuals ($\xi$)
The residuals are defined by the structural equation: $$\xi = \delta^* - X\hat{\theta}_1 \tag{19}$$
Substituting the numerical matrices: $$\xi = \begin{pmatrix} 0.31 \\ -0.09 \\ -1.24 \end{pmatrix} - \begin{pmatrix} 1 & 2 \\ 1 & 3 \\ 1 & 4 \end{pmatrix} \begin{pmatrix} 1.985 \\ -0.775 \end{pmatrix} = \begin{pmatrix} -0.125 \\ 0.250 \\ -0.125 \end{pmatrix} \tag{20}$$

Step 4: GMM Objective Evaluation

Evaluate how well the current $L$ satisfies $\mathbb{E}[Z'\xi] = 0$.
  1. Sample moments ($g(L)$): Empirical correlation between instruments and structural error.
$$g(L) = \frac{1}{J} Z'\xi = \frac{1}{3}\begin{pmatrix} 1 & 1 & 1 \\ 2 & 3 & 4 \end{pmatrix} \begin{pmatrix} -0.125 \\ 0.250 \\ -0.125 \end{pmatrix}
= \begin{pmatrix} 0 \\ 0 \end{pmatrix} \tag{21}$$
In real applications, $Z$ contains valid cost-side or BLP instruments and $g(L)$ is rarely exactly zero at non-optimal $L$.
  1. GMM objective ($Q(L)$): Weighted quadratic form.

Step 5: Optimizer Update & Iteration

The non-linear optimizer proposes a new $L$ to further minimize $Q(L)$.
  1. New proposal: $$L^{\text{new}} = \begin{pmatrix} 0.75 & 0 \\ 0.28 & 0.48 \end{pmatrix} \tag{23}$$
  1. Loop: Return to Step 1 with $L^{\text{new}}$, recompute $\mu$, solve the fixed point for $\delta^*$, run IV regression, and evaluate $Q(L^{\text{new}})$. Repeat until $Q(L)$ converges to a global minimum.

Summary

The BLP Nested Fixed Point algorithm decomposes into two nested computational layers:
| Layer | Role | Key Operation |
| **Outer** | Optimize $L$ (non-linear parameters) | BFGS / gradient-based search over Cholesky factors |
| **Inner** | Solve for $\delta^*(L)$ (mean utilities) | Contraction mapping $\delta \leftarrow \delta + \ln S - \ln \hat{s}$ |
Each outer iteration requires solving the full inner fixed point, making the BLP estimator computationally intensive but structurally rich — capturing heterogeneous consumer preferences through random coefficients.
Loading...