NM-method
The NM-method or Naszodi–Mendonca method is the operation that can be applied in statistics, econometrics, economics, sociology, and demography to construct counterfactual contingency tables. The method finds the matrix () which is "closest" to matrix ( called the seed table) in the sense of being ranked the same but with the row and column totals of a target matrix . While the row totals and column totals of are known, matrix itself may not be known. Since the solution for matrix is unique, the NM-method is a function: , where is a row vector of size , while is a column vector of size . The NM-method was developed by Naszodi and Mendonca (2021) (and first applied by Naszodi and Mendonca (2019) to solve for matrix in problems, where matrix is not a sample from the population characterized by the row totals and column totals of matrix , but represents another population. Their application aimed at quantifying intergenerational changes in the strength of educational homophily and thus measuring the historical change in social inequality between different educational groups in the US between 1980 and 2010. The trend in inequality was found to be U-shaped, supporting the view that with appropriate