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_data
forSimulation
initialization.- Parameters
T (int) – Number of markets.
J (int) – Number of products in each market.
F (int) – Number of firms. If
J
is divisible byF
, firms produceJ / F
products 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 * J
rows corresponds to a product. Fields:market_ids : (object) - Market IDs that take on values from
0
toT - 1
.firm_ids : (object) - Firm IDs that take on values from
0
toF - 1
.
- Return type
recarray
Examples