Fixed Coefficients Random Utility (Demand) Estimation

This notebook reviews the estimation and inference of a linear random utility model when the agent is facing a finite number of alternatives.

Introduction

Consider a set of $J+1$ alternatives $\{0,1,2,...,J\}$. The utility that decision maker (DM) $i$ receives from buying projusct $j$ is $$ u_{ij} = x_{ij}' \beta -\alpha p_j + \xi_j+ \epsilon_{ij}.$$ The DM maximizes her utility $$y_i =\arg \min_{j} u_{ij}.$$

We now assume that $\epsilon_{ij}$ are $i.i.d.$ across DMs and across alternatives. In addition, we assume that $\epsilon_{ij}$ are distributed (standard) T1EV. We can write the following Conditional Choice Probabilities (CCP): $$ Pr(y_i = j) = \frac{e^{x_{ij}'\beta}}{\sum_{k=0}^{J}e^{x_{ik}'\beta}}.$$

Aggregate, market-level data In Berry, Levinson, and Pakes (1995) and in many other empirical work following BLP the researcher observes only market-level data. That means that the characteristics vector of the alternatives is not indexed by $i$. The variation in product characteristics are unobserved and get absorbed by the error term $\epsilon$. The choice probabilities become $$ Pr(y = j|x_j, \xi_j; \beta) \ \text{for} \ j=0,,,J = \frac{e^{x_{j}'\beta}}{\sum_{k=0}^{J}e^{x_{k}'\beta}}.$$ The left-hand side is simply the market share of product/alternative $j$. We will denote these market shares as $s_0,s_1,...,s_{J-1}$. The CCP above all have the same denominator. Moreover, for identification reasons, we normalize $x_0 = 0$. Therefore, $$ \frac{s_j}{s_0} = e^{x_j'\beta}.$$

Using Berry's Inversion (1994), and take log for both sides gives us:

$$ \text{ln}(s_j) - \text{ln} (s_0) \ = \delta_j \equiv x_j' \beta - \alpha p_j + \xi_j \ \ \ \ \ \text{(eq} A) $$

where

For the rest of this notebook, we will introduce two empirical examples:

A. Estimate logit-demand using, BLP(1995)'s aggregate market level data.

B. Monte Carlo Example: estimate logit-demand after solving Nash-Bertrand game

A1.Introduction of car data from BLP(1995)

As an empirical study, we will replicate Table 3, as in BLP (1995).

Variable name/short description

For detailed description, please see BLP(1995) section 7.1. (Data section)

Variable name Description
name Car
id Car ID
ye Year
cy Cylinder
dr Number of Doors
at Automatic Transmission
ps Power Steering
air Air Conditioning
drv Front Wheel Drive
p Price (in \$ 1000's)
wt Weight
dom Domestic
disp Engine Displacement
hp Horse Power
lng Length
wdt Width
wb Wheelbase
mpg Miles per Gallon
q Quantities
firmids Firm ID
euro Indicator for EURO car
reli Rating
dfi Indicator for Digital Fuel Injection
hp2wt HP to Weight (ratio)
size Length X Width (/1000)
japan Japan
cpi CPI
gasprice Gas Price per gallon
nb_hh Size of Household (Potential Market Size)
cat Size Cateogry
cat (Using for nested logit)
door2 I(door=2)
door3 I(door=3)
door4 I(door=4)
door5 I(door=5)
sampleweight Weights
mpgd Miles per gallon (imputed from gas prices)
dpm Dollars per miles (imputed from gas prices)
modelid Car name

A2. Data cleaning

Step 1. Obtain market share for each good $j$: $s_{jt}$ = $\frac{q_{jt}}{nb\_hh_{t}}$

For notation, let denote total market size $nb\_hh_t = M_t$

Step 2. Obtain market share for outside good 0: $s_{0t}$ = $\frac{ \Big(nb\_hh_t - \sum_{k=1}^J(q_{kt}) \Big)}{nb\_hh_t}$

Step 3. Construct dependent variable: $ \text{ln}(s_{jt}) - \text{ln}(s_{0t}) $

A3. Run linear regression using eq(A)

Step 4. we use hp2wt, air, mpgd, size as product characteristics:

$$ \text{ln}(s_j) - \text{ln} (s_0) \ = \delta_j \equiv x_j' \beta - \alpha p_j + \xi_j $$

Step 5. Obtain Price elasticities:

Note that own price elasticities $(\eta_j$) is given by:

\begin{align} \eta_j & = \frac{\partial Pr(j)}{\partial price_j} \underbrace{\frac{price_j}{Pr(j)}}_{\frac{price_j}{s_j \times M}} \\ & \text{Note that} \ \frac{\partial Pr(j)}{\partial price_j} = \frac{\partial s_j}{\partial price_j} \times M \ \text{where} \ s_j = \frac{e^{\delta_j}}{\sum_k^J e^{\delta_j}} \\ & \text{Appealing to chain rule}: \frac{\partial s_j}{\partial price_j} \ M = \Bigg[ \alpha \frac{e^{\delta_j}}{\sum_k^J e^{\delta_j}} - \alpha \Big( \frac{e^{\delta_j}}{\sum_k^J e^{\delta_j}}\Big)^2 \Bigg] = M \alpha [s_j - s_j^2] = M \alpha s_j[1- s_j]\\ & \text{Rearranging these terms gives us:} \\ & \eta_j = \underbrace{\frac{\partial Pr(j)}{\partial price_j}}_{M \alpha s_j[1- s_j]} \underbrace{\frac{price_j}{Pr(j)}}_{\frac{price_j}{s_j \times M}} = M \alpha s_j[1- s_j] \times \frac{price_j}{s_j} \frac{1}{M} = \underbrace{\alpha \times (1-s_j) \times price_j}_\text{price elasticities for good j} \\ & = \alpha \times (1-s_j) \times price_j \end{align}

Replication: BLP Table 3, IV Logit Demand Column (Row: No. Inelastic De) in page 873.

I derive the number of inelastic car model. My estimates are 1,502. BLP's estimates were 1,494, which is pretty close.

A4. Run 2sls using instruments

Following BLP, I use the following instruments for price.

1. the sum of size at market $t$. (Note that you need to drop product $j$'s own size.)

2. the sum of size across rival firm products at market $t$.

Comparision with BLP Table 3, IV Logit Demand Column (Row: No. Inelastic De) in page 873.

Note that I have slightly different price coefficients, I observe number of inelastic demand good is 2. BLP estimates were 22.

Step 6. Discussion : IV regressions

Reported price coefficient ($\alpha$) is -0.0886 in OLS.

Now we have -0.2894 ($\alpha$) in IV regression. Prices are upward biased in OLS.

B. Monte Carlo Example: estimate logit-demand after solving Nash-Bertrand game

B1. Data Generating Process

Market is characterized by dupoly firms which procuce single good, with aggregate market shares, and price for each good. We assume that duopoly firms compete in 500 "independent" (isolated) markets.

In D.G.P., we solve Nash-Bertrand game so that we derive dupoly firm's price, and market shares. We use cost shifters and product characteritics to numerically solve this game. Since it is D.G.P. we use true parameters to obtain price, and market shares.

As an econometrician, we observe dupoly firm's market share, price, costs, and product characteristics.

The utility of each consumer $i$ in each market is given by:

\begin{equation} u_{ij} = \beta_0 + \beta_1 x_j + \sigma_d \xi_j - \alpha p_j + \epsilon_{ij} \end{equation}

Marginal cost is constrained to be postitive and given by:

\begin{equation} c_j = e^{\gamma_0 + \gamma_x x_j + \sigma_c \xi_j + \gamma_w w_j + \sigma_\omega \omega_j} \end{equation}

The exogenous data $x_j, \xi_j, w_j, $ and $\omega_j$ are all created standard normal random variables.

True parameter is given by:

Parameter True Value Description
$ \beta_0$ 5 Intercept (demand)
$ \beta_x$ 2 Utility from good $x$
$ \sigma_d$ 1 / 3 (second monte carlo) Covariance
$\alpha $ 1 Price coefficients
$ \gamma_0$ 1 Intercept (Supply)
$\gamma_x $ 5 Cost from good $x$
$ \sigma_c$ 0.25 Covariance $(\xi_j)$
$ \gamma_w$ 0.25 Parameters for input costs
$ \sigma_\omega$ 0.25 Covariance $(\omega_j)$

B2. Obtain (numerically) equilibrium price and market shares (still D.G.P)

I solve nonlinear equation where under j=1,2. (Argument: $p_1, p_2, s_1(p_1, p_2), s_2(p_1,p_2)$) $X$ is a vector dupoly firm's product charactersitics $ X = \{ x_1, x_2 \}$ Note that $s_0 = 1-s_1-s_2$

\begin{align} p_1 & = c_1 - \frac{1}{\alpha (1-s_1)} \\ p_2 & = c_2 - \frac{1}{\alpha (1-s_2)} \\ & \text{Note that $s_1$, and $s_2$ is given by} \\ s_1(X,p_1, p_2) & = \frac{exp^{\beta_0 + \beta_1 x_1 + \sigma_d \xi_1 - \alpha p_1}}{1+exp^{\beta_0 + \beta_1 x_1 + \sigma_d \xi_1 - \alpha p_1} +exp^{\beta_0 + \beta_1 x_2 + \sigma_d \xi_2 - \alpha p_2} } \\ s_2(X,p_1, p_2) & = \frac{exp^{\beta_0 + \beta_1 x_2 + \sigma_d \xi_2 - \alpha p_2}}{1+exp^{\beta_0 + \beta_1 x_1 + \sigma_d \xi_1 - \alpha p_1} + exp^{\beta_0 + \beta_1 x_2 + \sigma_d \xi_2 - \alpha p_2}} \end{align}

Using Nonlinear solver, we can obtain equilibrium outcome: $p_1, p_2, s_1, s_2 (s_0= 1-s_1-s_2).$ One might concern about multiple equilibria for this game. Since we solve single product under duopoly (which is simple market), we observe unique solution for this Monte Carlo Study. Please see Nalebuff (1991) for multi-product firm problem, or uniquness of this game.

B3. Regress using OLS / IV

Following Berry's inversion an econometrician run following OLS/IV regression. An econometrician observes price, product characteristics, and cost shifters for 500 independent dupoly markets.

\begin{align} \text{ln} (s_j) - \text{ln} (s_0) \ & = \delta_j \\ & = \beta_0 + \beta_1 x_j - \alpha p_j + \sigma_d \xi_j \end{align}

For IV, I use cost shifters, and competitors' product characteristics, as in Berry (1994)

Note that in OLS, since an econometrician cannot observe $\xi_j$ term, price coefficients $\alpha$ is upward biased. In the IV regression, the observed cost factors, $w_j$, and the product characteristic of the rival firm are used as instruments for price.

For each simulation, we independently draw these for 500 markets, as in Berry(1994).

Repeat 100 times, and report Monte Racrlo results

Replicate Table 1 in Berry(1994), column (1) and (2), where $\sigma_d=1$

Replicate Table 1 in Berry(1994), column (1) and (2), where $\sigma_d=3$

Reference

Berry, Steven T. "Estimating discrete-choice models of product differentiation." The RAND Journal of Economics (1994): 242-262.

Berry, Steven, James Levinsohn, and Ariel Pakes. "Automobile prices in market equilibrium." Econometrica: Journal of the Econometric Society (1995): 841-890.