pyblp.ProblemResults.compute_aggregate_elasticities

ProblemResults.compute_aggregate_elasticities(factor=0.1, name='prices', market_id=None)

Estimate aggregate elasticities of demand, \(\mathscr{E}\), with respect to a variable, \(x\).

In market \(t\), the aggregate elasticity of demand is

(1)\[\mathscr{E} = \sum_{j=1}^{J_t} \frac{s_{jt}(x + \Delta x) - s_{jt}}{\Delta},\]

in which \(\Delta\) is a scalar factor and \(s_{jt}(x + \Delta x)\) is the share of product \(j\) in market \(t\), evaluated at the scaled values of the variable.

Parameters
  • factor (float, optional) – The scalar factor, \(\Delta\).

  • 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 aggregate elasticities. By default, aggregate elasticities are computed in all markets and stacked.

Returns

Estimates of aggregate elasticities of demand, \(\mathscr{E}\). If market_id was not specified, rows are in the same order as Problem.unique_market_ids.

Return type

ndarray

Examples