pyblp.OptimalInstrumentResults.to_dict

OptimalInstrumentResults.to_dict(attributes=('demand_instruments', 'supply_instruments', 'inverse_covariance_matrix', 'expected_xi_by_theta_jacobian', 'expected_omega_by_theta_jacobian', 'expected_prices', 'expected_shares', 'computation_time', 'draws', 'fp_converged', 'fp_iterations', 'contraction_evaluations'))

Convert these results into a dictionary that maps attribute names to values.

Parameters

attributes (sequence of str, optional) – Name of attributes that will be added to the dictionary. By default, all OptimalInstrumentResults attributes are added except for OptimalInstrumentResults.problem_results, OptimalInstrumentResults.supply_shifter_formulation, and OptimalInstrumentResults.demand_shifter_formulation.

Returns

Mapping from attribute names to values.

Return type

dict

Examples