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. Demand-side 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
Returns

A BLP problem.

Return type

Problem

Examples