pyblp.data¶
Locations of example data that are included in the package for convenience.

pyblp.data.
NEVO_PRODUCTS_LOCATION
¶ Location of a CSV file containing the fake cereal product data from Nevo (2000). The file includes the same precomputed excluded instruments used in the original paper.
 Type
str

pyblp.data.
NEVO_AGENTS_LOCATION
¶ Location of a CSV file containing the fake cereal agent data. Included in the file are Monte Carlo weights and draws along with demographics, which are used by Nevo (2000) to solve the fake cereal problem.
 Type
str

pyblp.data.
BLP_PRODUCTS_LOCATION
¶ Location of a CSV file containing the automobile product data extracted by Andrews, Gentzkow, and Shapiro (2017) from the original GAUSS code for Berry, Levinsohn, and Pakes (1999), which is commonly assumed to be the same data used in Berry, Levinsohn, and Pakes (1995).
The file also includes a set of optimal excluded instruments computed in the spirit of Chamberlain (1987) for the automobile problem from Berry, Levinsohn, and Pakes (1995), which are used to solve the problem in the tutorial. These instruments were computed according to the following procedure:
Traditional excluded BLP instruments from the original paper were computed with
build_blp_instruments()
. As in the original paper, thempd
variable was added to the set of excluded supplyside instruments.Each set of excluded instruments was interacted up to the third degree, standardized, replaced with the minimum set of principal components that explained at least 99% of the variance, and standardized again.
These two sets of principal components were used as excluded demand and supplyside instruments when solving the first GMM stage of a
Problem
configured as in the tutorial, but with nonoptimal instruments.The
compute_optimal_instruments()
method was used to estimate the optimal excluded instruments for the problem, which were standardized.
 Type
str

pyblp.data.
BLP_AGENTS_LOCATION
¶ Location of a CSV file containing automobile agent data. Included in the file are 200 Monte Carlo weights and draws for each market, which, unlike in the fake cereal data, are not the same draws used in the original paper.
Also included is an income demographic, which consists of draws from lognormal distributions with common standard deviation
1.72
and the following marketvarying means:Year
Mean
1971
2.01156
1972
2.06526
1973
2.07843
1974
2.05775
1975
2.02915
1976
2.05346
1977
2.06745
1978
2.09805
1979
2.10404
1980
2.07208
1981
2.06019
1982
2.06561
1983
2.07672
1984
2.10437
1985
2.12608
1986
2.16426
1987
2.18071
1988
2.18856
1989
2.21250
1990
2.18377
These numbers were extracted also extracted from the original GAUSS code for Berry, Levinsohn, and Pakes (1999).
 Type
str
Examples