pyblp.ProblemResults.compute_shares

ProblemResults.compute_shares(prices=None, market_id=None)

Estimate shares evaluated at specified prices.

Note

To compute equilibrium shares (and prices) associated with a more complicated counterfactual, a Simulation for the counterfactual can be initialized with the estimated parameters, structural errors, and marginal costs from these results, and then solved with Simulation.replace_endogenous().

Parameters
  • prices (array-like) – Prices at which to evaluate shares, such as equilibrium prices, \(p^*\), computed by ProblemResults.compute_prices(). By default, unchanged prices are used.

  • market_id (object, optional) – ID of the market in which to compute shares. By default, shares are computed in all markets and stacked.

Returns

Estimates of shares evaluated at the specified prices.

Return type

ndarray

Examples