Solves, simulates, and estimates separable matching TU models
Project description
cupid_matching
A Python package to solve, simulate and estimate separable matching models
- Free software: MIT license
- Documentation: https://bsalanie.github.io/cupid_matching
- See also: An interactive Streamlit app
Installation
pip install [-U] cupid_matching
Importing functions from the package
For instance:
from cupid_matching.min_distance import estimate_semilinear_mde
Examples
example_choosiow.py
shows how to run minimum distance and Poisson estimators on a Choo and Siow homoskedastic model.example_nestedlogit.py
shows how to run minimum distance estimators on a two-layer nested logit model.
Warnings
- many of these models (including all variants of Choo and Siow) rely heavily on logarithms and exponentials. It is easy to generate examples where numeric instability sets in.
- as a consequence, the
numeric
versions of the minimum distance estimator (which use numerical derivatives) are not recommended. - the bias-corrected minimum distance estimator (
corrected
) may have a larger mean-squared error and/or introduce numerical instabilities.
Release notes
version 1.0.4
- added an optional bias-correction for the minimum distance estimator in the Choo and Siow homoskedastic model, to help with cases when the matching patterns vary a lot across cells.
- added two complete examples: example_choosiow.py and example_nestedlogit.py.
version 1,0.5
- simplified the bias-correction for the minimum distance estimator in the Choo and Siow homoskedastic model.
version 1.0.6
- corrected typo.
version 1.0.7
- fixed error in bias-correction term.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cupid_matching-1.0.7.tar.gz
(2.5 MB
view hashes)
Built Distribution
Close
Hashes for cupid_matching-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d125f72c90362f1c294850d7d486d8fdc28d2c64aa1789a0a6f9c7f1f12b8c38 |
|
MD5 | 532cf104f23330ef0b90d315cc013750 |
|
BLAKE2b-256 | 36343cf710fda7ffe7cc5588f707bbbe67899faf477cf6545e6b86894e09f9e7 |