pyblp.ProblemResults.compute_delta

ProblemResults.compute_delta(agent_data=None, integration=None, iteration=None, fp_type='safe_linear', shares_bounds=(1e-300, None), market_id=None)

Estimate mean utilities, \(\delta\).

This method can be used to compute mean utilities at the estimated parameters with a different integration configuration or with different fixed point iteration settings than those used during estimation. The estimated ProblemResults.delta will be used as starting values for the fixed point routine.

A more precisely estimated mean utility can be used, for example, by ProblemResults.importance_sampling(). It can also be used to ProblemResults.compute_shares() to compare the performance of different integration routines.

Parameters
  • agent_data (structured array-like, optional) – Agent data that will be used to compute \(\delta\). By default, agent_data in Problem is used. For more information, refer to Problem.

  • integration (Integration, optional) – Integration configuration that will be used to compute \(\delta\), which will replace any nodes field in agent_data. This configuration is required if agent_data is specified without a nodes field. By default, agent_data in Problem is used. For more information, refer to Problem.

  • iteration (Iteration, optional) – Iteration configuration for how to solve the fixed point problem used to compute \(\delta\) in each market. By default, Iteration('squarem', {'atol': 1e-14}) is used. For more information, refer to Problem.solve().

  • fp_type (str, optional) – Configuration for the type of contraction mapping used to compute \(\delta\) in each market. By default, 'safe_linear' is used. For more information, refer to Problem.solve().

  • shares_bounds (tuple, optional) – Configuration for \(s_{jt}(\delta, \theta)\) bounds of the form (lb, ub), in which both lb and ub are floats or None. By default, simulated shares are bounded from below by 1e-300. This is only relevant if fp_type is 'safe_linear' or 'linear'. Bounding shares in the contraction does nothing with a nonlinear fixed point. For more information, refer to Problem.solve().

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

Returns

Mean utilities, \(\delta\).

Return type

ndarray

Examples