﻿ BLP_Model

# Random Coefficients Logit Model (BLP Model)

## Background

What we want to do?

• We want to estimate how the attributes of a product affect heterogeneous consumer demand
• Price is (one of) the most important attributes to consider
• Endogeneity: But price is almost certainly correlated with the unobserved attributes (quality, etc.) of a product

Berry, Levinsohn, and Pakes (1995)—known as BLP—use instruments to isolate exogenous variation in price (a two-step procedure)

• (1) Estimating the average utility for each product in each market
• (2) Regressing this average utility value on price and other observable attributes

### Previous Models for Differentiated Products Before BLP Model

#### Neoclassical Demand Models

• A $J$-product demand system:
$Q_{1}^d=h_1(P_1, P_2, \cdots, P_J, Z_1, \beta_1, v_1)$
$\cdots$
$Q_{J}^d=h_1(P_1, P_2, \cdots, P_J, Z_J, \beta_J, v_J)$

• $P_j:$ price of product $j$
• $Z_j:$ demand of product $j$
• $\beta:$ parameters that affect the shape and position of demand
• $ν$: market demand error
• And a $J$-equation system of first-order profit maximization conditions
$P_1=g_1(Q_1^s, Q_2^s, \cdots, Q_J^s, W_1; \theta_1, \eta_1)$
$\cdots$
$P_J=g_1(Q_1^s, Q_2^s, \cdots, Q_J^s, W_J; \theta_J, \eta_J)$

• $W_i:$ variables that enter the firms’ cost functions
• $\theta_i:$ parameters that affect the shape and position of the firms’ cost curves and possibly describe their competitive interactions
• $\eta_i:$ error term

Shortages

• Too many parameters need to be estimated
• Significant computational cost
• No unique solution or a real-valued solution for all error and parameter values (or no nonnegative prices)

Ways to simplify traditional neoclassical demand models

• Constraining a product’s cross-price elasticities to all be the same for all products
• Multi-level demand specifications

## The Set-Up

The model set-up and the following replication code are mainly based on Nevo (2000)

• Notations: $t=1, \cdots, T$ markets, each with $i = 1, \cdots, I_t$ customers; $j=1, \cdots, J$ products

• The indirect utility of consumer $i$ from consuming product $i$ in market $t$:
$u_{ijt}=\alpha_i (y_i-p_{jt}) + \bm{x}_{jt}^{T}\bm{\beta}_i+\xi_{jt}+ \epsilon_{ijt}$

• $\alpha_i$: consumer $i$’s marginal utility from income
• $y_i$: the income of consumer $i$
• $p_{jt}$: price of product $j$ in market $t$
• $\bm{x}_{jt}$: K-dimensional (column) vector of non-price attributes of product $j$ in market $t$
• $\bm{\beta}_i$: K-dimensional (column) vector of individual-specific taste coefficients
• $\xi_{jt}$: utility of unobserved attributes of product $j$ in market $t$
• $\varepsilon_{njm}$: idiosyncratic unobserved utility
• Customer $i$ will choose $j$ in market $t$ if $u_{ijt}\geq u_{ikt}, \forall k\in J$

• No purchase (outside option): $u_{i0t}=0$
• Consumer preferences vary as a function of the individual characteristics

• $\alpha_i$, $\bm{\beta}_i$
• Two components: observed (demographic; $D_i$) + unobserved ($v_i$)
• Though we do not observe individual data, we know something about the distribution of the demographics, $D_i$, but not $v_i$
• $\begin{bmatrix} \beta_i \\ \alpha_i\end{bmatrix}=\begin{bmatrix} \bar{\beta} \\ \bar{\alpha}\end{bmatrix}+\Pi D_i+\Sigma v_i, \\ D_i\sim P^*_D(D), v_i\sim P^*_v(v)$
• $[\bar{\beta}, \bar{\alpha}]'$: population mean
• $\Pi$: $(K+1)\times d$ matrix of coeffificients
• $D_i$: customer-level observables, $d\times 1$ vector
• $v_i$: customer-level unobservables
• $\Sigma$: variance-covariance scaling matrix
• Let $(\theta_1, \theta_2)$ represent all parameters

• $\theta_1 = (\bar{\alpha}, \bar{\beta})$; linear parameters
• $\theta_2 = (\Pi, \Sigma)$; nonlinear parameters
• Utility decomposition
$u_{ijt}=\alpha_i y_i + [-p_{jt}, \bm{x}_{jt}^{T}]\begin{bmatrix}\alpha_i \\ \bm{\beta}_i\end{bmatrix}+\xi_{jt}+ \epsilon_{ijt}$
$=\alpha_i y_i + {\color{blue}(-p_{jt}\bar{\alpha}+\bm{x}_{jt}^{T}\bar{\bm{\beta}} + \xi_{jt})} + {\color{purple}[-p_{jt}, \bm{x}_{jt}^{T}](\Pi D_i+\Sigma v_i)} + \epsilon_{ijt}$
$=\alpha_i y_i+{\color{blue}\delta_{jt}(p_{jt}, \bm{x}_{jt}^{T}, \xi_{jt}; \theta_1)} + {\color{purple}v_{ijt}(p_{jt}, \bm{x}_{jt}^{T}, D_i, v_i; \theta_2)} + \epsilon_{ijt}$

• $\text{\color{blue}Component that varies over products and markets}$
• $\text{\color{purple}Component that varies by consumer}$
• The set of individual attributes leads to the choice of product $j$

• What kinds of customers will choose $j$ in market $t$?
• $A_{jt}=\{D_i,v_i, \epsilon_{i0t}, \cdots, \epsilon_{iJt}|u_{ijt}\geq u_{i\ell t}, \forall\ell= 0,1,\cdots, J\}$
• The market share of the $j$th product in market $t$ is just an integral over the mass of consumers in the region $A_{jt}$

• $s_{jt}=\int_{A_{jt}}d P^*(D, v, \epsilon)$
$=\int_{A_{jt}} dP^*(\epsilon|D, v) dP^*(v|D) dP^*_D(D)$ $\text{\tiny\color{green}(Bayes’ rule)}$
$=\int_{A_{jt}} dP^*_{\epsilon}(\epsilon)dP^*_v(v) dP^*_D(D)$ $\text{\tiny\color{green}(independence assumptions)}$
• Assuming $\epsilon_{ijt}$ follows Type I Extreme Value Distribution, then the probability that consumer $i$ will choose product $j$
$p_{ijt}(v_i)=\frac{exp(\delta_{jt}+v_{ijt})}{1+\sum_{k=1}^J exp(\delta_{kt}+v_{ikt})}$
- It reduces to the standard logit model if $v_{ijt}=0$
- The integral defining the market shares has to be computed by simulation, e.g.,
$\widehat{s}_{jt}=\frac{1}{ns}\sum_{i=1}^{ns}p_{ijt}(v_i)$ where $i=1,2,\cdots, ns$, are random draws

## Identification and Estimation

### Instrumenting for Price

• $\delta_{jt} = -p_{jt}\bar{\alpha}+\bm{x}_{jt}^{T}\bar{\bm{\beta}} + \xi_{jt}$
• Once we have estimated the constant terms (across customers) $\delta_{jt}$, we can regress them on prices and other attributes to estimate $\bar{\bm{\beta}}$
• But price is endogenous—it depends on $\xi_{jm}$—so we have to instrument for price in this regression
• Instrumenting in a linear model is easy if we have good instruments
• Commonly used instruments:
• The product characteristics
• Prices of products in other markets

### How do we estimate $\delta_{jt}$?

• The $\delta_{jt}$ terms determine predicted market shares. We want to find $\delta_{jt}$ that equates predicted market shares with observed market shares

• BLP paper states

• For a given set of $(\theta_1, \theta_2)$ parameters, a unique vector $\bm{\delta}$ equates predicted market shares with observed market shares
• Contraction Mapping Algorithm

1. Begin with some initial product-market constant values, $\bm{\delta}^0$
2. Predict the market share for the current constant values, $\widehat{S}_{jt}(\bm{\delta}^s)$, for each product-market
3. Adjust each product-market constant term by comparing predicted and observed market share
$\delta_{jt}^{s+1} = \delta_{jt}^s + \ln \left( \frac{S_{jt}}{\widehat{S}_{jt}(\bm{\delta}^s)} \right)$
• $S_{jt}$: observed market share
4. Repeat steps 2 and 3 until the algorithm converges to the set of product-market constants, $\widehat{\bm{\delta}}$

### Estimation

Two steps

1. Outer loop: search over $(\theta_1, \theta_2)$ to optimize the estimation objective function
1. Inner loop: use the contraction mapping to find $\bm{\delta}(\theta_1)$
2. Use $(\theta_1, \theta_2)$ and $\bm{\delta}(\theta_1)$ to simulate choice probabilities
3. Use choice probabilities to calculate the estimation objective function
2. Estimate $\bar{\bm{\beta}}$ by regressing $\delta_{jt}$ on $(p_{jt}, \bm{x}_{jt})$ with price instruments, $\bm{z}_{jt}$
• We can use MSL (method of simulated likelihood) for step 1 and 2SLS (two-stage least square) for step 2
• We can use MSM (method of simulated moments) for steps 1 and 2 simultaneously

## Replication of BLP (1995) Using Python

• Market share $s_{jt}$ (number of automobiles sold)
• Prices $p_{jt}$
• Distribution of demographics $\hat{P^*_D}$ (maybe using Current Population Survey)