pyblp.SimulationResults.to_problem¶

SimulationResults.
to_problem
(product_formulations=None, product_data=None, agent_formulation=None, agent_data=None, integration=None, costs_type=None)¶ 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^x\), along with any supply shifters (variables in \(X_3\) but not \(X_1\)). Supply side instruments are constructed from variables in \(X_3\), along with any demand shifters (variables in \(X_1\) but not \(X_3\)). 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.
costs_type (str, optional) – By default,
Simulation.costs_type
.
 Returns
A BLP problem.
 Return type
Problem
Examples