# affinity

# Affinity estimation

## Description:

Affinity estimation is a general method for estimating matching models. Economic agents match because the output they generate together is often higher than the sum of the outputs they would generate individually. This occurs in family economics (couple formation), labour economics (employment), industrial organizations (industrial alliances), finance (mergers), international trade (trade flows), school choice (class formation), among other fields. Complementarities are crucial: the economic approach to marriage, for instance, assumes that two individual decide to match only if the utility they get together if they team up is greater than the utility they get staying single. Matching patterns, i.e. who matches with whom, will be determined by (i) the strength of complementarities, and (ii) by the relative scarcity of a given characteristics on which matching occurs.

The empirical estimation of matching models has had a distinguished tradition in econometrics since the 1950’s with early work by Tinbergen and others, but was revived in the mid-2000s in the field of family economics by a landmark paper by Choo and Siow on the identification of the “gains from marriage” in a matching model with transferable utility and logit-type heterogeneities. In somewhat general terms, the question is: given the observation of matching patterns (frequency of matches between each pair of types) and sometimes supplementary information such as observations on the surplus generated, or on the transfers between partners, what surplus functions are compatible with the observations?

Choo and Siow’s paper opened up a avenue of possibilities for the estimation of matching models, which we have pursued relentlessly. In initial work with Salanié, we showed that Choo and Siow’s framework can be formulated as a regularized optimal transport problem and we have provided a general estimation framework for the estimation of matching models with any separable heterogeneity structure using a moments-based procedure. With Dupuy, we have introduced affinity estimation which offers a tractable parameterization of the matching surplus function, in a setting which is flexible enough to accommodate both discrete and continuous observable characteristics. Affinity estimation consists of taking a bi-linear parameterization of the surplus function such that the terms of the matrix of complementarities (“affinity matrix”) indicate the amount of attraction (positive or negative) between a pair of characteristics of two agents to be matched. We have shown that the equilibrium conditions in this model can be expressed a gravity equation, so that one can use an approach based on Poisson pseudo-maximum likelihood (PPML) with two-way fixed effects, as is done in the trade literature. This allows us to estimate the affinity matrix which indicates the characteristics on which the sorting primarily occurs. While the classical setting of affinity estimation is bipartite (i.e. the matched partners are drawn from separate populations: men and women, workers and firms, buyers and sellers), it can be extended to the unipartite setting, as we have shown in work with Ciscato and Goussé. This is of particular interest in family economics as it permits to use affinity estimation to analyze same-sex unions. In practice, one often encounters cases when agents’ individual characteristics are high dimensional. In ongoing work with Dupuy and Sun we address this problem by rank-regularization techniques coupled with a cross validation criterion.

## My co-authors:

Edoardo Ciscato, Arnaud Dupuy, Marion Goussé, Bernard Salanié, and Yifei Sun.

## Presentation slides:

Slides can be found here.

## Code:

See models routines of the TraME library.

## References:

Alfred Galichon, and Bernard Salanié (2012). Cupid’s Invisible Hand: Social Surplus and Identification in Matching Models. Revision requested (2nd round), * Review of Economic Studies*. Available here.

Arnaud Dupuy, and Alfred Galichon (2014). Personality traits and the marriage market.

**122 (6), pp. 1271-1319. Winner of the 2015 Edmond Malinvaud prize. Available here.**

*Journal of Political Economy*Arnaud Dupuy, and Alfred Galichon (2015). Canonical Correlation and Assortative Matching: A Remark.

**119-120, pp. 375—383. Available here.**

*Annals of Economics and Statistics*Edoardo Ciscato, Alfred Galichon, and Marion Goussé (2017). Like Attract Like? A Structural Comparison of Homogamy Across Same-Sex and Different-Sex Households. Revision requested,

*. Available here.*

**Journal of Political Economy**Arnaud Dupuy, Alfred Galichon, and Yifei Sun (2017). Estimating matching affinity matrix under low-rank constraints. Available here.

“Systems and Methods for Matching with Affinity Learning” (2017). U.S. Provisional Patent App. No. 62/500940.