matchingMarkets
Analysis of Stable Matchings in R
Functions
matchingMarkets comes with two estimators:
stabit: Implements a Bayes estimator that 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 are based on the Prosser (2014) constraint encoding model. They allow for incomplete preference lists (some agents find certain agents unacceptable) and unbalanced instances (unequal number of agents on both sides).
Installation
To get the latest stable version from CRAN:
install.packages("matchingMarkets")
library(matchingMarkets)Under Linux, the dependency package gmp requires that you have GNU MP (> 4.1.4) installed, see http://gmplib.org.
To get the most recent development version from GitHub:
install.packages("devtools")
devtools::install_github("thiloklein/matchingMarkets")
library(matchingMarkets)or from R-Forge:
install.packages("matchingMarkets", repos="http://R-Forge.R-project.org")
library(matchingMarkets)Documentation
Package documentation and vignette are available from the CRAN page. An application of the estimator in function stabit is in Klein (2015).