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 social and economic policies inequality can be reduced. Definition of matrix ranking The closeness between two matrices of the same size can be defined in several ways. The Euclidean distance, and the Kullback-Leibler divergence are two well-known examples. The NM-method is consistent with a definition relying on the ordinal Liu-Lu index which is the slightly modified version of the Coleman-index defined by Eq. (15) in Coleman (1958). According to this definition, matrix is "closest" to matrix , if their Liu-Lu values are the same. In other words, if they are ranked the same by the ordinal Liu-Lu index. If is a 2×2 matrix, its scalar-valued Liu-Lu index is defined as , where ; ; ; ; . Following Coleman (1958), this index is interpreted as the “actual minus expected over maximum minus minimum”, where is the actual value of the entry of the seed matrix ; is its expected (integer) value under the counterfactual assumptions that the corresponding row total and column total of are predetermined, while its interior is random. Also, is its minimum value if the association between the row variable and the column variable of is non-negative. Finally, is the maximum value of () for given row total and column total . For matrix of size n×m (, ), the Liu-Lu index was generalized by Naszodi and Mendonca (2021) to a matrix-valued index. One of the preconditions for the generalization is that the row variable and the column variable of matrix have to be ordered. Equating the generalized, matrix-valued Liu-Lu index of with that of matrix is equivalent to dichotomizing their ordered row variable and ordered column variable in ways by explointing the ordered nature of the row and column variables. Than, equating the original, scalar-valued Liu-Lu indices of the 2×2 matrices obtained with the dichotomizations. I.e.,