# pyblp.SimulationResults¶

class pyblp.SimulationResults

Results of a solved simulation of synthetic BLP data.

The SimulationResults.to_problem() method can be used to convert the full set of simulated data (along with some basic default instruments) and configured information into a Problem.

simulation

Simulation that created these results.

Type

Simulation

product_data

Simulated Simulation.product_data with product characteristics replaced so as to be consistent with the true parameters. If Simulation.replace_endogenous() was used to create these results, prices and market shares were replaced. If Simulation.replace_exogenous() was used, exogenous characteristics were replaced instead. The data_to_dict() function can be used to convert this into a more usable data type.

Type

recarray

delta

Simulated mean utility, $$\delta$$.

Type

ndarray

costs

Simulated marginal costs, $$c$$.

Type

ndarray

computation_time

Number of seconds it took to compute prices and market shares.

Type

float

fp_converged

Flags for convergence of the iteration routine used to compute prices or $$\delta$$ (depending on the method used to create these results) in each market. Flags are in the same order as Simulation.unique_market_ids.

Type

ndarray

fp_iterations

Number of major iterations completed by the iteration routine used to compute prices or $$\delta$$ in each market. Counts are in the same order as Simulation.unique_market_ids.

Type

ndarray

contraction_evaluations

Number of times the contraction used to compute prices or $$\delta$$ was evaluated in each market. Counts are in the same order as Simulation.unique_market_ids.

Type

ndarray

Examples

Methods

 compute_micro_values(micro_moments) Compute simulated micro moment values $$v_{mt}$$. to_dict([attributes]) Convert these results into a dictionary that maps attribute names to values. to_problem([product_formulations, …]) Convert the solved simulation into a problem.