Code for separable matching models

I have developed a Python package called cupid_matching that implements several of the methods proposed in my “Cupid” paper with Alfred Galichon. It replaces the now-defunct CupidPython.

These methods apply to separable, one-to-one, bipartite matching models with perfectly transferable utility. The package is fully documented on my Github page. It contains:

  • the Iterative Projection Fitting Procedures to solve for the stable matching in several variants of the Choo and Siow 2006 model, and for a class of nested logit models
  • two estimation procedures for models with a semilinear surplus:
    • a Poisson GLM estimator for the Choo and Show model
    • a minimum distance estimator that applies more generally.

Here is also R code that runs IPFP in the Choo and Siow model.

My coauthor Alfred Galichon (NYU) and Keith O’Hara (Amazon) have developed the TraME library: a set of procedures for Transportation Methods for Econometrics. It allows the user to estimate a much broader class of models. TraME is available on Github. Here are some more specific links: