This code was written to perform the procedure for testing firm conduct developed in “Testing Firm Conduct” by Marco Duarte, Lorenzo Magnolfi, Mikkel Sølvsten, and Christopher Sullivan. It builds on the PyBLP source code (see Conlon and Gortmaker (2020)) - to do so.
The code implements the following features:
Computes Rivers and Vuong (2002) (RV) test statistics to test a menu of two or more models of firm conduct allowing for the possibility that firms or consumers face per unit or ad-valorem taxes.
Implements the RV test using the variance estimator of Duarte, Magnolfi, Sølvsten, and Sullivan (2023), including options to adjust for demand estimation error and clustering
Computes the effective F-statistic proposed in Duarte, Magnolfi, Sølvsten, and Sullivan (2023) to diagnose instrument strength with respect to worst-case size and best-case power of the test, and reports appropriate critical values
Reports Hansen, Lunde, and Nason (2011) MCS p-values for testing more than two models
Compatible with PyBLP Conlon and Gortmaker (2020), so that demand can be estimated with PyBLP, and the estimates are an input to the test for conduct
For a full list of references, see the references in Duarte, Magnolfi, Sølvsten, and Sullivan (2023).
Install
First, you will need to download and install python, which you can do from this link.
You will also need to make sure that you have all package dependencies installed.
To install the pyRVtest package, use pip:
pip install pyRVtest
This should automatically install the python packages on which pyRVtest depends: numpy, pandas, statsmodels, pyblp
To update to a newer version of the package use:
pip install --upgrade pyRVtest
Using the package
For a detailed tutorial about how to set up and run the testing procedure, see Tutorial.
Citing the package
When using the package, please include the following citation:
Duarte, M., L. Magnolfi, M. Sølvsten, C. Sullivan, and A. Tarascina (2023): “pyRVtest: A Python package for testing firm conduct,” https://github.com/anyatarascina/pyRVtest.
@misc{ pyrvtest, author={Marco Duarte and Lorenzo Magnolfi and Mikkel S{o}lvsten and Christopher Sullivan and Anya Tarascina}, title={texttt{pyRVtest}: A Python package for testing firm conduct}, howpublished={url{https://github.com/anyatarascina/pyRVtest}}, year={2023}
Bugs and Requests
Please use the GitHub issue tracker to submit bugs or to request features.
Metadata
Release files for pyRVtest 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyrvtest-0.3.2.tar.gz | 2.1 MB | Without provenance | Details for pyrvtest-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyrvtest-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for pyrvtest-0.3.2-py3-none-any.whl |
Total release size: 2.2 MB
Release files / pyrvtest-0.3.2.tar.gz
| Download URL | pyrvtest-0.3.2.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65492b383e63f55834334a9cce2da153b5049958c48112dec08cedfc24212614
|
|
BLAKE2b-256 checksum How to use checksums |
02ac5e934bc0240d3be77804380b7ad90e23f168004add58ca37259f63fd8863
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.15
|
Release files / pyrvtest-0.3.2-py3-none-any.whl
| Download URL | pyrvtest-0.3.2-py3-none-any.whl |
|---|---|
| Size | 64.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b81e376023bc1bdcf4491521498d77432ea6112b6eaa443309fdfaecbacd49e1
|
|
BLAKE2b-256 checksum How to use checksums |
75907299751eb45b4c2c193a20e04aa4dee022d8109177916cf41d912bc26c50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.15
|
Security for pyRVtest 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.