Introduction

Paul Schrimpf

2026-02-23

Some Motivating Examples

\[ \def\Er{{\mathrm{E}}} \def\En{{\mathbb{E}_n}} \def\cov{{\mathrm{Cov}}} \def\var{{\mathrm{Var}}} \def\R{{\mathbb{R}}} \def\arg{{\mathrm{arg}}} \newcommand\norm[1]{\left\lVert#1\right\rVert} \def\rank{{\mathrm{rank}}} \newcommand{\inpr}{ \overset{p^*_{\scriptscriptstyle n}}{\longrightarrow}} \def\inprob{{\,{\buildrel p \over \rightarrow}\,}} \def\indist{\,{\buildrel d \over \rightarrow}\,} \DeclareMathOperator*{\plim}{plim} \DeclareMathOperator*{\argmax}{argmax} \DeclareMathOperator*{\argmin}{argmin} \newcommand{\etae}{{\boldsymbol{\eta}}} \def\ke{{\mathbf{k}}} \def\xe{{\mathbf{x}}} \]

Extremum Estimators

\[ \begin{align*} \hat{\theta} \in \argmin_{\theta \in \Theta} Q_n(\theta) \end{align*} \]

  • Parameter \(\theta \in \Theta\)
  • Data-dependent objective function \(Q_n: \Theta \to \R\)

Examples

Least-Squares

  • Model: \[ y_i = x_i'\beta + \epsilon_i \]
  • \(Q_n(\beta) = \frac{1}{n} \sum_{i=1} (y_i - x_i'\beta)^2\)

Maximum Likelihood

  • Model: \(y_i\) has conditional pdf \(f(y|x_i;\theta)\), independent across \(i\)
  • \(Q_n(\theta) = -\frac{1}{n} \sum_{i=1}^n \log\left(f(y_i | x_i; \theta)\right)\)

Generalized Method of Moments

  • Model: \[ \Er\left[g(y_i,x_i,\theta_0) \right] = 0 \] for moment function \(g(y_i,x_i,\cdot): \Theta \to \R^k\)
  • \(Q_n(\theta) = \left(\frac{1}{n}\sum_{i=1}^n g(y_i,x_i,\theta)\right)' W \left(\frac{1}{n}\sum_{i=1}^n g(y_i,x_i,\theta)\right)\)

Example: Consumption and Assets

Consumption and Assets

  • Hansen and Singleton (1982)
  • Model \[ \begin{align*} \max_{c_t, q_t} & \Er\left[ \sum_{t=0}^\infty \beta^t u(c_t) \Biggm| \mathcal{I}_0 \right] \\ \text{s.t. } & \;\; p_t q_t + c_t \leq (p_t + d_t)q_{t-1} + y_t \end{align*} \]

Consumption and Assets

  • Cleverly rearrange first order conditions: \[ \Er\left[\beta \frac{u'(c_{t+1})}{u'(c_t)} \underbrace{\frac{p_{t+1} + d_{t+1}}{p_t}}_{R_t} \Biggm| \mathcal{I}_s \right] = 1 \text{ for } s \leq t \]

Consumption and Assets

  • Assume \(u(c) = \frac{c^{1-\gamma}}{1-\gamma}\) \[ \Er\left[\beta \frac{c_{t+1}^{-\gamma}}{c_t^{-\gamma}} R_t \Biggm| \mathcal{I}_s \right] = 1 \text{ for } s \leq t \]
  • Model implies \[ \Er\left[\left(\beta \frac{c_{t+1}^{-\gamma}}{c_t^{-\gamma}} R_t -1 \right)Z_t \right] = 0 \] for any \(Z_t \in \mathcal{I}_t\)
  • I.e. \[ g(\overbrace{X_t}^{(c_t,c_{t+1},R_t,Z_t)}, \underbrace{\theta}_{(\beta,\gamma)}) = \left(\beta \frac{c_{t+1}^{-\gamma}}{c_t^{-\gamma}} R_t -1 \right)Z_t \]

Example: Random Coefficients Demand

Random Coefficients Demand

  • Berry, Levinsohn, and Pakes (1995)
  • Consumers choose product: \[ j = \argmax_{j \in \{0, ..., J\}} x_{jt}' (\bar{\beta} + \Sigma \nu_i) + \xi_{jt} + \epsilon_{ijt} \]
    • \(\nu_i \sim N(0,I_k)\), \(\epsilon_{ijt} \sim\) Type I Extreme Value
    • Unobserved demand shock \(\xi_{jt}\)

Random Coefficients Demand

  • Aggregate demand: \[ s_{jt} = \int \frac{e^{x_{jt}'(\bar{\beta} + \Sigma \nu) + \xi_{jt}}} {\sum_{k = 0}^J e^{x_{kt}'(\bar{\beta} + \Sigma \nu) + \xi_{kt}} } dF\nu \]

Random Coefficients Demand

  • Instruments \(Z_{jt}\) with \(E[\xi_{jt} Z_{jt}] = 0\)
  • \(g(s_{jt},x_{jt}, Z_{jt}, \bar{\beta},\Sigma) = \left(\delta_{jt}(s_{\cdot t}, x_{\cdot t},\beta,\Sigma) - x_{jt}'\bar{\beta}\right) Z_{jt}\)
  • where \(\delta_{jt}\) solves \[ s_{jt} = \int \frac{e^{\delta_{jt} + x_{jt}'\Sigma \nu}} {\sum_{k = 0}^J e^{\delta_{kt} + x_{kt}'\Sigma \nu}} dF\nu \]

Example: Insurance and Drug Demand

Insurance and Drug Demand

  • Einav, Finkelstein, and Schrimpf (2015)
  • Risk-neutral forward-looking individual faces uncertain health shocks, choose whether or not to fill prescriptions
  • Prescriptions are defined by \((\theta ,\omega )\)
    • \(\theta >0\) is the prescription’s (total) cost

    • \(\omega >0\) is the monetized cost of not taking the drug

    • Arrive at weekly rate \(\lambda\), drawn from \(G(\theta ,\omega)=G_{2}(\omega |\theta )G_{1}(\theta )\)

    • \(\lambda\) follows a Markov process \(H(\lambda |\lambda ^{\prime })\)

  • Insurance defines \(c(\theta ,x)\) – the out-of-pocket cost associated with a prescription that costs \(\theta\) when total spending so far is \(x\)

Insurance and Drug Demand

  • Flow utility \[ u(\theta ,\omega ;x)=\left \{ \begin{array}{ll} -c(\theta ,x) & if\text{ }filled \\ -\omega & if\text{ }not\text{ }filled% \end{array}% \right. \]

  • Bellman equation: \[ \begin{eqnarray*} v(x,t,\lambda _{t+1}) &=&E_{\lambda |\lambda _{t+1}} \\ &&\hspace{-1.35in}\left[ \begin{array}{c} (1-\lambda )\delta v(x,t-1,\lambda )+ \\ \lambda \int \max\left \{ \begin{array}{l} -c(\theta ,x)+\delta v(x+\theta ,t-1,\lambda ), \\ -\omega +\delta v(x,t-1,\lambda )% \end{array}% \right \} dG(\theta ,\omega )% \end{array}% \right] \end{eqnarray*} \] with terminal condition \(v(x,0)=0\) for all \(x\)

Insurance and Drug Demand

  • Estimate by simulated method of moments
    • Simulate model
    • Minimize difference between observed summary statistics and summary statistics in simulated data

Example: Pipeline Investment Incentives

Pipeline Investment

  • Solimine and Schrimpf (2025)
  • Pipeline \(i\), year \(t\), chooses investment \(i_{it}\)
  • Capital evolves as \(k_{it+1} = k_{it} + i_{it}\)
  • Common exogenous state variable \(s_t\)
  • Private investment cost shock \(\eta_{it}\)
  • Profits \(\pi(k_{it},\ke_{-it}, s_t)\)
  • Investment cost \(\tilde{c}(i_{it},k_{it},\ke_{-it},\eta_{it})\)
  • Others strategies \(\sigma_{-i}(\ke_t,s_t,\etae_{-it})\)

Pipeline Investment: Bellman Equation

  • Bellman equation \[ \begin{align} V(k_{it},\ke_{-it},s_{t},\eta_{it}) = \max_{i_{it}} & \pi(k_{it},\ke_{-it}, s_{t}) - \tilde{c}(i_{it}, k_{it}, s_t, \eta_{it}) + \\ & + \beta \Er\left[ V(k_{it} + i_{it},\ke_{-it} + \sigma_{-i}(\ke_t,s_t,\etae_{-it}),s_{t+1}) \bigm| s_{t}, \ke_{-it}, k_{it} + i_{it}, \eta_{it} \right] \end{align} \]

Pipeline Investment: First Order Condition and Envelope Theorem

  • First order condition \[ \frac{\partial \tilde{c}}{\partial i}(i_{it},\xe_{t}, \eta_{it}) = \beta \Er\left[ \frac{\partial V}{\partial k_i}(\xe_{t+1}, \eta_{it+1}) \biggm| i_{it}, \xe_{t}, \eta_{it} \right] \]

  • Envelope theorem

\[ \begin{align} \frac{\partial V}{\partial k_i}(\xe_{t}, \eta_{it}) = & \frac{\partial \pi}{\partial k_i}(\xe_{t},\eta_{it}) - \frac{\partial \tilde{c}}{\partial k_i}(i_{it}, \xe_{t}, \eta_{it}) + \notag \\ & + \beta \Er\left[ \frac{\partial V}{\partial k_i}(\xe_{t+1}, \eta_{it+1}) + \frac{\partial V}{\partial \ke_{-i}}(\xe_{t+1}, \eta_{it+1}) \frac{\partial \sigma_{-i}}{\partial k_i}(\xe_{t}, \etae_{-it}) \biggm | i_{it}, \xe_{t}, \eta_{it} \right] \notag \\ = & \frac{\partial \pi}{\partial k_i}(\xe_{t},\eta_{it}) - \frac{\partial \tilde{c}}{\partial k_i}(i_{it},\xe_{t}, \eta_{it}) + \frac{\partial \tilde{c}}{\partial i}(i_{it}, \xe_{it}, \eta_{it}) + \beta \Er\left[ \frac{\partial V}{\partial \ke_{-i}}(\xe_{t+1},\eta_{it+1}) \frac{\partial \sigma_{-i}}{\partial k_i}(\xe_{t}, \etae_{-it}) \biggm| i_{it}, \xe_t, \eta_{it} \right] \end{align} \]

Pipeline Investment: Euler-like equation

\[ \begin{aligned} \frac{\partial \tilde{c}}{\partial i}(i_{it}, \xe_{t}, \eta_{it}) = & \beta \Er\left[ \frac{\partial \pi}{\partial k}(\xe_{t+1}, \eta_{it+1}) + \frac{\partial \tilde{c}}{\partial i}(i_{it+1}, \xe_{t+1}, \eta_{it+1}) - \frac{\partial \tilde{c}}{\partial k}(i_{it+1}, \xe_{t+1}, \eta_{it+1}) \biggm| i_{it}, \xe_{t}, \eta_{it} \right] + \\ & + \beta^2 \Er\left[\frac{\partial V}{\partial \ke_{-i}}(\xe_{t+2}, \eta_{it+2}) \frac{\partial \sigma_{-i}}{\partial k_i}(\xe_{t+1}, \etae_{-it+1}) \biggm| i_{it}, \xe_{t}, \eta_{it} \right] \end{aligned} \]

  • Estimation: \(\pi\) and \(\Er[\cdot|\cdot]\) can be estimated from observed data, use those to recover \(\tilde{c}\)

Pipeline Investment: Identifying Investment Cost

  • Conditional expectation operators: \[ \mathcal{E}_{\sigma}(f)(\xe_t,\eta_{it}) = \Er\left[f(\xe_{t+1},\eta_{it+1}) \left( I + \frac{\partial \sigma_{-i}}{\partial \ke_{-i}}(\xe_t, \etae_{-it}) \right)\bigm|i^*(\xe_t,\eta_t),\xe_t,\eta_{it}\right]. \] and \[ \mathcal{E}(f)(\xe_t, \eta_{it}) = \Er[f(\xe_{t+1},\eta_{it+1})| i^*(\xe_t,\eta_{it}),\xe_t, \eta_{it}] \]
  • Investment cost solves \[ \frac{\partial \tilde{c}}{\partial i} = \beta \mathcal{E} \left( \frac{\partial \pi}{\partial k} + \frac{\partial \tilde{c}}{\partial i} - \frac{\partial \tilde{c}}{\partial k} + \beta\mathcal{E}\left( \left(\left(I - \beta \mathcal{E}_\sigma \right)^{-1} \left(\frac{\partial \pi}{\partial \ke_{-i}} - \frac{\partial \tilde{c}}{\partial \ke_{-i}} \right)\right) \times \frac{\partial \sigma_{-i}}{\partial k} \right) \right) \]

Implementing

Implementing

  • Need to go from mathematical description of model to code
  • All examples need to minimize an objective function
    • Helpful to compute both objective function and its derivatives
  • Random coefficients demand model also needs to solve nonlinear equations and compute integrals
  • Drug example needs numeric dynamic programming - function approximation and numeric integration
  • Pipeline example involves differential equation, conditional expectation operators

References

Berry, Steven, James Levinsohn, and Ariel Pakes. 1995. “Automobile Prices in Market Equilibrium.” Econometrica 63 (4): pp. 841–890. http://www.jstor.org/stable/2171802.
Einav, Liran, Amy Finkelstein, and Paul Schrimpf. 2015. “The Response of Drug Expenditure to Nonlinear Contract Design: Evidence from Medicare Part d.” The Quarterly Journal of Economics 130 (2): 841–99. https://doi.org/10.1093/qje/qjv005.
Hansen, Lars Peter, and Kenneth J. Singleton. 1982. “Generalized Instrumental Variables Estimation of Nonlinear Rational Expectations Models.” Econometrica 50 (5): 1269–86. http://www.jstor.org/stable/1911873.
Solimine, Philip, and Paul Schrimpf. 2025. “Investment and Misallocation in Infrastructure Networks: The Case of u.s. Natural Gas Pipelines.” In Proceedings of the 26th ACM Conference on Economics and Computation, 2. New York, NY, USA: Association for Computing Machinery. https://doi.org/10.1145/3736252.3742482.