pyblp.SimulationResults.to_problem¶

SimulationResults.
to_problem
(product_formulations=None, product_data=None, agent_formulation=None, agent_data=None, integration=None, distributions=None, epsilon_scale=None, costs_type=None, add_exogenous=True)¶ Convert the solved simulation into a problem.
Arguments are the same as those of
Problem
. By default, the structure of the problem will be the same as that of the solved simulation.By default, some simple “sums of characteristics” BLP instruments are constructed. Demandside instruments are constructed by
build_blp_instruments()
from variables in \(X_1^{ ext{ex}}\), along with any supply shifters (variables in \(X_3^{ ext{ex}}\) but not \(X_1^{ ext{ex}}\)). Supply side instruments are constructed from variables in \(X_3^{ ext{ex}}\), along with any demand shifters (variables in \(X_1^{ ext{ex}}\) but not \(X_3^{ ext{ex}}\)). Instruments will also be constructed from columns of ones if there is variation in \(J_t\), the number of products per market. Any constant columns will be dropped. For example, if each firm owns exactly one product in each market, the “rival” columns of instruments will be zero and hence dropped.Note
These excluded instruments are constructed only for convenience. Especially for more complicated problems, they should be replaced with better instruments.
 Parameters
product_formulations (Formulation or sequence of Formulation, optional) – By default,
Simulation.product_formulations
.product_data (structured arraylike, optional) – By default,
SimulationResults.product_data
with excluded instruments.agent_formulation (Formulation, optional) – By default,
Simulation.agent_formulation
.agent_data (structured arraylike, optional) – By default,
Simulation.agent_data
.integration (Integration, optional) – By default, this is unspecified.
distributions (sequence of str, optional) – By default,
Simulation.distributions
.epsilon_scale (float, optional) – By default,
Simulation.epsilon_scale
.costs_type (str, optional) – By default,
Simulation.costs_type
.add_exogenous (bool, optional) – By default,
True
.
 Returns
A BLP problem.
 Return type
Problem
Examples