While answering a comment, I realized I had a post-worth response. R has become the "default language" for a lot of computational research statistics (for a number of reasons; nice NYT article here). It's high level, free and open-source, and has a closely-related journal for publishing statistical algorithms. Citations and peer review are key for academia, so you get a lot of well-described code posted to the R archives (CRAN) with descriptions posted to JStat. This spills over into a lot of blogs and quick demonstration code posts.
That is to say, there's an enormous user-create code base for R. When I need to find an algorithm online, I'll often first look to the massive R codebase. A quick search for R code turned up the following:
From an R blogger, with code (see the gist link):
The Deferred Acceptance Algorithm (DAA) goes back to Gale and Shapley (1962). They introduce a rather simple algorithm that finds a stable matching for example for college admissions or in a marriage market. ... Variations of this algorithm are used in Hospital assignments in the USA, whereby recently graduated doctors submit preferences over hospitals, and hospitals submit preferences over graduates. ... Here I'm going to use R to make a little simulation of this
From an install-able github repository for matching markets:
R package matchingMarkets
comes with two estimators:
stabit
: Implements a Bayes estimator that estimates agents' preferences and corrects for sample selection in matching markets when the selection process is a one-sided matching game (i.e. group formation).
stabit2
: Implements the Bayes estimator for a two-sided matching game (i.e. the college admissions and stable marriage problems).
and three algorithms that can be used to simulate matching data:
hri
: Constraint model for the hospital/residents problem. Finds all stable matchings in two-sided matching markets. Implemented for both the stable marriage problem (one-to-one matching) and the hospital/residents problem, a.k.a. college admissions problem (many-to-one matching).
sri
: Constraint model for the stable roommates problem. Finds all stable matchings in the roommates problem (one-sided matching market).
ttc
: Top-Trading-Cycles Algorithm. Finds stable matchings in the housing market problem.
Functions hri
and sri
allow for incomplete preference lists (some agents find certain agents unacceptable) and unbalanced instances (unequal number of agents on both sides).
Hopefully one of these can help. The second one in particular looks extremely useful, particularly if it provides an empirical estimator.