Learn R Programming

logmult (version 0.7.4)

maor: Mean Absolute Odds Ratio or Intrinsic Association Coefficient

Description

Compute the mean absolute odds ratio of a table, i.e. the (possibly weighted) geometric mean of the odds ratios or of their inverse when they are above one, which is also closely related to the the intrinsic association coefficient. The latter coefficient was first devised by Goodman (1996) as the “generalized contingency” when a logarithm link is used, and it is equal to the mean of the absolute value of log-linear two-way interaction parameters \(\lambda_{ij}\) (in its original version it consists in the square root of the sum of squared parameters).

Usage

maor(tab, phi = FALSE, cell = FALSE,
     weighting = c("marginal", "uniform", "none"),
     norm = 2, component=c("total", "symmetric", "antisymmetric"),
     row.weights = NULL, col.weights = NULL)

Arguments

tab

a two- or three-way table without zero cells; for three-way tables, average marginal weighting is used when “weighting = "marginal"”, and the MAOR is computed for each layer (third dimension).

phi

if “TRUE”, return the intrinsic association coefficient rather than the Mean absolute odds ratio.

cell

if “TRUE”, return the per-cell contributions (affected by the value of phi, see “Details” below).

weighting

what weights should be used when normalizing the scores.

norm

the norm to use to compute the mean of \(\lambda_{ij}\) parameters, 1 for the mean of absolute values, or 2 for the square root of the sum of squared parameters (as in the original version).

component

whether to compute the total association, or from symmetric or antisymmetric interaction coefficients only.

row.weights

optional custom weights to be used for rows, e.g. to compute the phi coefficient for several tables using their overall marginal distribution. If specified, weighting is ignored.

col.weights

see row.weights.

Value

The numeric value of the mean absolute odds ratio, or of the intrinsic association coefficient (if phi = TRUE), or the corresponding per-cell contributions (if cell = TRUE).

Details

See Goodman (1996), Equation 52 for the (marginal or other) weighted version of the intrinsic association coefficient (\(\tilde \phi\)); the unweighted version can be computed with unit weights. The coefficient is called \(\tilde \lambda^2\) in the original article, but to avoid the confusion with Goodman and Kruskal's lambda coefficient, it is here denoted as \(\phi\), as usual in row-column association models. The uniform-weighted version is defined as: $$\phi = \sqrt{ \frac{1}{IJ} \sum_{i = 1}^I \sum_{j = 1}^J \lambda_{ij}^2 }$$ The (marginal or other) weighted version is defined as: $$\tilde \phi = \sqrt{ \sum_{i = 1}^I \sum_{j = 1}^J \tilde \lambda_{ij}^2 P_{i+} P_{+j} }$$ with \(\sum_{i = 1}^I \lambda_{ij} = \sum_{j = 1}^J \lambda_{ij} = 0\) and \(\sum_{i = 1}^I P_{i+} \tilde \lambda_{ij} = \sum_{j = 1}^J P_{+j} \tilde \lambda_{ij} = 0\).

The uniform-weighted version of the mean absolute odds ratio (MAOR) is defined as: $$MAOR = \exp \left[ \sqrt{ \frac{4}{ IJ (I-1) (J-1)} } \phi \right]$$ The (marginal or other) weighted version is defined as: $$MAOR = \exp \left[ \sqrt{ \frac{4}{\sum_{i = 1}^I \sum_{j = 1}^J P_{i+} (1 - P_{i+}) P_{+j} (1 - P_{+j})} } \tilde \phi \right]$$

Per-cell contributions \(c_{ij}\) are defined so that \(\tilde \phi = \sqrt{ \sum_{i = 1}^I \sum_{j = 1}^J c_{ij} }\) and \(MAOR = exp \left[ \sqrt{ \sum_{i = 1}^I \sum_{j = 1}^J c_{ij} } \right]\).

This index cannot be computed in the presence of zero cells since it is based on the logarithm of proportions. In these cases, 0.5 is added to all cells of the table (Agresti 2002, sec. 9.8.7, p. 397; Berkson 1955), and a warning is printed. Make sure this correction does not affect too much the results (especially with small samples) by manually adding different values before calling this function.

References

Agresti, A. 2002. Categorical Data Analysis. New York: Wiley.

Goodman, L. A. (1996). A Single General Method for the Analysis of Cross-Classified Data: Reconciliation and Synthesis of Some Methods of Pearson, Yule, and Fisher, and Also Some Methods of Correspondence Analysis and Association Analysis. J. of the Am. Stat. Ass. 91(433):408-428.

Berkson, J. (1955). Maximum Likelihood and Minimum chi2 Estimates of the Logistic Function. J. of the Am. Stat. Ass. 50(269):130-162.

See Also

iac, unidiff, rc