pyblp.build_id_data¶
-
pyblp.build_id_data(T, J, F)¶ Build a balanced panel of market and firm IDs.
This function can be used to build
id_dataforSimulationinitialization.- Parameters
T (int) – Number of markets.
J (int) – Number of products in each market.
F (int) – Number of firms. If
Jis divisible byF, firms produceJ / Fproducts in each market. Otherwise, firms with smaller IDs will produce excess products.
- Returns
IDs that associate products with markets and firms. Each of the
T * Jrows corresponds to a product. Fields:market_ids : (object) - Market IDs that take on values from
0toT - 1.firm_ids : (object) - Firm IDs that take on values from
0toF - 1.
- Return type
recarray
Examples