Skip to content

Commit

Permalink
ENH: add Petrin (2002) replication data
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgortmaker committed Jul 27, 2022
1 parent 8210fdd commit 6ee3b48
Show file tree
Hide file tree
Showing 5 changed files with 15,459 additions and 5 deletions.
33 changes: 28 additions & 5 deletions pyblp/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
----------
NEVO_PRODUCTS_LOCATION : `str`
Location of a CSV file containing the fake cereal product data from :ref:`references:Nevo (2000a)`. The file
includes the same pre-computed excluded instruments used in the original paper.
includes the same pre-computed excluded instruments used in the original paper. The data are from Aviv Nevo's Matlab
code, which was archived on Eric Rasmusen's website.
NEVO_AGENTS_LOCATION : `str`
Location of a CSV file containing the fake cereal agent data. Included in the file are Monte Carlo weights and
draws along with demographics from the original paper.
Location of a CSV file containing the agent data from :ref:`references:Nevo (2000a)`. Included in the file are Monte
Carlo weights and draws along with demographics from the original paper. The data are from Aviv Nevo's Matlab code,
which was archived on Eric Rasmusen's website.
BLP_PRODUCTS_LOCATION : `str`
Location of a CSV file containing the automobile product data extracted by
:ref:`references:Andrews, Gentzkow, and Shapiro (2017)` from the original GAUSS code for
Expand All @@ -21,8 +23,25 @@
variable was added to the set of excluded instruments for supply.
BLP_AGENTS_LOCATION : `str`
Location of a CSV file containing the automobile agent data. Included in the file are the importance sampling
weights and draws along with the income demographic from the original paper.
Location of a CSV file containing the agent data from :ref:`references:Berry, Levinsohn, and Pakes (1999)`. Included
in the file are the importance sampling weights and draws along with the income demographic from the original paper.
These data are also from the replication code of :ref:`references:Andrews, Gentzkow, and Shapiro (2017)`.
PETRIN_PRODUCTS_LOCATION : `str`
Location of a CSV file containing the automobile product data from :ref:`references:Petrin (2002)`. The file
includes the same pre-computed excluded instruments used in the original paper. The data are from Amil Petrin's
GAUSS code, available on his website.
PETRIN_AGENTS_LOCATION : `str`
Location of a CSV file containing agent data similar to that used by :ref:`references:Petrin (2002)`. The file
includes 1,000 scrambled Halton draws in each market, along with demographics resampled from the Consumer
Expenditure Survey (CEX) used by the original paper. The original paper used pseudo Monte Carlo draws and
importance sampling. The demographics that were resampled are from Amil Petrin's GAUSS code, available on his
website.
PETRIN_VALUES_LOCATION : `str`
Location of a CSV file containing micro moment values matched by :ref:`references:Petrin (2002)`. These are the
rounded values reported in Table 6a of the working paper version of the original paper.
PETRIN_COVARIANCES_LOCATION : `str`
Location of a CSV file containing micro moment sample covariances used by :ref:`references:Petrin (2002)`. The data
are from Amil Petrin's GAUSS code, available on his website.
Examples
--------
Expand All @@ -40,3 +59,7 @@
NEVO_AGENTS_LOCATION = str(_DATA_PATH / 'nevo_agents.csv')
BLP_PRODUCTS_LOCATION = str(_DATA_PATH / 'blp_products.csv')
BLP_AGENTS_LOCATION = str(_DATA_PATH / 'blp_agents.csv')
PETRIN_PRODUCTS_LOCATION = str(_DATA_PATH / 'petrin_products.csv')
PETRIN_AGENTS_LOCATION = str(_DATA_PATH / 'petrin_agents.csv')
PETRIN_VALUES_LOCATION = str(_DATA_PATH / 'petrin_values.csv')
PETRIN_COVARIANCES_LOCATION = str(_DATA_PATH / 'petrin_covariances.csv')

0 comments on commit 6ee3b48

Please sign in to comment.