compute_shares(prices=None, delta=None, agent_data=None, integration=None, market_id=None)¶
It may be desirable to compute the shares associated with equilibrium prices that have been computed, for example, by
To compute equilibrium shares (and prices) associated with a more complicated counterfactual, a
Simulationfor the counterfactual can be initialized with the estimated parameters, structural errors, and marginal costs from these results, and then solved with
Alternatively, this method can also be used to evaluate the performance of different numerical integration configurations. One way to do so is to use
ProblemResults.compute_delta()to compute mean utilities with a very precise integration rule (one that is infeasible to use during estimation), use these same mean utilities and integration rule to precisely compute shares, and then compare error between these precisely-computed shares and shares computed with less precise (but feasible to use during estimation) integration rules, still using the precisely-computed mean utilities.
prices (array-like, optional) – Prices at which to evaluate shares, such as equilibrium prices, \(p^*\), computed by
ProblemResults.compute_prices(). By default, unchanged prices are used.
delta (array-like, optional) – Mean utilities that will be used to evaluate shares, such as those computed more precisely by
ProblemResults.compute_delta(). By default, the estimated
ProblemResults.deltais used, and updated with any specified
integration (Integration, optional) –
Integrationconfiguration that will be used to compute shares, which will replace any
agent_data. This configuration is required if
agent_datais specified without a nodes field. By default,
Problemis used. For more information, refer to
market_id (object, optional) – ID of the market in which to compute shares. By default, shares are computed in all markets and stacked.
Estimates of shares evaluated at the specified prices.
- Return type