<p>There's two implementations that should somewhat cover your needs, <code>matchingR</code> which does reduced-form algorithmic matching and <code>matchingMarkets</code>, which estimates estructural matching models with some baysean tools to correct for endogeneity. </p>

<p>The problem is you're looking for some very specific models which may require some tweaks on these implementations. </p>

CC BY-SA 4.0
2019-04-11T17:01:59.723Z
Thank you, Pedro! If I understand correctly, both packages solve the marriage problem with non-transferable utility (NTU). I look for the transferable utility case, which actually has a very different solution.
Muly
CC BY-SA 4.0
2019-04-12T18:57:40.190Z
``matchingMarkets`` might cover your needs if you write the model such that selection depends on the utility of other participants! If that doesn't work for whatever reason then you might need to dig in the source-code and tweak it until you get what you need.
Pedro Cavalcante
CC BY-SA 4.0
2019-04-10T21:16:48.937Z
2019-04-10T21:16:48.937Z
Pedro Cavalcante
<p>I'm looking for a package or a code (preferably in R) that finds the solution to the stable marriage problem with transferable utilities (Shapley and Shubik 1971). Specifically, I'm looking for one or more of the following:</p>

<ol>
<li>The stable allocation, given a matrix of the joint surplus</li>
<li>The set of transfers that support this allocation</li>
<li>Option to specify another matrix of acceptable matches</li>
</ol>

<p>As far as I know, the package matchingMarkets in R find the solution to that problem only in the case of non-transferable utilities. Any ideas?</p>

CC BY-SA 4.0
2019-04-10T21:53:05.170Z
Maybe this can be incorporated here: https://economics.stackexchange.com/questions/1638/available-code-for-computing-solutions-to-matching-algorithms
Bayesian
<computation><search-and-matching><r>
Stable marriage problem with transferable utilities
Muly
# Stable marriage problem with transferable utilities

(Asked by: username_0 on 2019-04-10)

I'm looking for a package or a code (preferably in R) that finds the solution to the stable marriage problem with transferable utilities (Shapley and Shubik 1971). Specifically, I'm looking for one or more of the following:

1. The stable allocation, given a matrix of the joint surplus
2. The set of transfers that support this allocation
3. Option to specify another matrix of acceptable matches

As far as I know, the package matchingMarkets in R find the solution to that problem only in the case of non-transferable utilities. Any ideas?

**Tags:** computation, search-and-matching, r
> **Comments:**
> **username_1**: Maybe this can be incorporated here: https://economics.stackexchange.com/questions/1638/available-code-for-computing-solutions-to-matching-algorithms  

---

## 1 answers

### Answer by username_2 on 2019-04-10. Score: 1

There's two implementations that should somewhat cover your needs, `matchingR` which does reduced-form algorithmic matching and `matchingMarkets`, which estimates estructural matching models with some baysean tools to correct for endogeneity.

The problem is you're looking for some very specific models which may require some tweaks on these implementations.

> **Comments:**
> **username_0**: Thank you, Pedro! If I understand correctly, both packages solve the marriage problem with non-transferable utility (NTU). I look for the transferable utility case, which actually has a very different solution.  
> **username_2**: ``matchingMarkets`` might cover your needs if you write the model such that selection depends on the utility of other participants! If that doesn't work for whatever reason then you might need to dig in the source-code and tweak it until you get what you need.  

---

