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 toProblemResults.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
inProblem
is used. For more information, refer toProblem
.integration (Integration, optional) –
Integration
configuration that will be used to compute \(\delta\), which will replace anynodes
field inagent_data
. This configuration is required ifagent_data
is specified without a nodes field. By default,agent_data
inProblem
is used. For more information, refer toProblem
.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 toProblem.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 toProblem.solve()
.shares_bounds (tuple, optional) – Configuration for \(s_{jt}(\delta, \theta)\) bounds of the form
(lb, ub)
, in which bothlb
andub
are floats orNone
. By default, simulated shares are bounded from below by1e-300
. This is only relevant iffp_type
is'safe_linear'
or'linear'
. Bounding shares in the contraction does nothing with a nonlinear fixed point. For more information, refer toProblem.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