pyblp.ProblemResults.compute_demand_hessians¶
-
ProblemResults.
compute_demand_hessians
(name='prices', market_id=None)¶ Estimate arrays of second derivatives of demand with respect to a variable, \(x\).
In market \(t\), the value indexed by \((j, k, \ell)\) is
(1)¶\[\frac{\partial^2 s_{jt}}{\partial x_{kt} \partial x_{\ell t}}.\]- Parameters
name (str, optional) – Name of the variable, \(x\). By default, \(x = p\), prices.
market_id (object, optional) – ID of the market in which to compute Hessians. By default, Hessians are computed in all markets and stacked.
- Returns
Estimated \(J_t \times J_t \times J_t\) arrays of second derivatives of demand. If
market_id
was not specified, arrays are estimated in each market \(t\) and stacked. Indices for a market are in the same order as products for the market. If a market has fewer products than others, extra indices will containnumpy.nan
.- Return type
ndarray
Examples