rpm-package: Modeling of Revealed Preferences Matchings

rpm-packageR Documentation

Modeling of Revealed Preferences Matchings


An integrated set of tools to fit a revealed preference model for men and women of certain characteristics (or shared characteristics) of people of the opposite sex. The model assumes a one-to-one stable matching using an observed set of matchings and a set of (possibly dyadic) covariates to estimate the parameters for linear equations of utilities. It does this using an large-population likelihood based on ideas from Dagsvik (2000), Menzel (2015) and Goyal et al (2023).


For a complete list of the functions, use library(help="rpm") or read the rest of the manual.

When publishing results obtained using this package the original authors are to be cited as:

Mark S. Handcock, Ryan M. Admiraal, Fiona C. Yeung, Heide M. Jackson, Michael S. Rendall and Shuchi Goyal (2022) rpm: Modeling of Revealed Preferences Matchings R package, Los Angeles, CA. Version 0.70, https://github.com/handcock/rpm.

All programs derived from this package must cite it. For complete citation information, use

For details on how to construct data for input to rpm() see the documentation:


For information on the current terms that can be used in formulas for rpm() see the documentation:



No return value, called for side effects.


Mark S. Handcock <handcock@stat.ucla.edu>


Goyal, Shuchi; Handcock, Mark S.; Jackson, Heide M.; Rendall, Michael S. and Yeung, Fiona C. (2023). A Practical Revealed Preference Model for Separating Preferences and Availability Effects in Marriage Formation, Journal of the Royal Statistical Society, A. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/jrsssa/qnad031")}

Dagsvik, John K. (2000) Aggregation in Matching Markets, International Economic Review, Vol. 41, 27-57. JSTOR: https://www.jstor.org/stable/2648822, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/1468-2354.00054")}

Menzel, Konrad (2015). Large Matching Markets as Two-Sided Demand Systems, Econometrica, Vol. 83, No. 3 (May, 2015), 897-941. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3982/ECTA12299")}

See Also

Useful links:



fit <- rpm(~match("edu") + WtoM_diff("edu",3),
          Xdata=fauxmatching$Xdata, Zdata=fauxmatching$Zdata,
          X_w="X_w", Z_w="Z_w",
          pair_w="pair_w", pair_id="pair_id", Xid="pid", Zid="pid",

# For details on how to construct data for input:
# For information on the current terms that can be used in formulas:

rpm documentation built on May 29, 2024, 12:07 p.m.