maor: Mean Absolute Odds Ratio or Intrinsic Association Coefficient

View source: R/maor.R

maorR Documentation

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 λ_{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 λ_{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.

Details

See Goodman (1996), Equation 52 for the (marginal or other) weighted version of the intrinsic association coefficient (\tilde φ); the unweighted version can be computed with unit weights. The coefficient is called \tilde λ^2 in the original article, but to avoid the confusion with Goodman and Kruskal's lambda coefficient, it is here denoted as φ, as usual in row-column association models. The uniform-weighted version is defined as:

φ = √{ \frac{1}{IJ} ∑_{i = 1}^I ∑_{j = 1}^J λ_{ij}^2 }

The (marginal or other) weighted version is defined as:

\tilde φ = √{ ∑_{i = 1}^I ∑_{j = 1}^J \tilde λ_{ij}^2 P_{i+} P_{+j} }

with ∑_{i = 1}^I λ_{ij} = ∑_{j = 1}^J λ_{ij} = 0 and ∑_{i = 1}^I P_{i+} \tilde λ_{ij} = ∑_{j = 1}^J P_{+j} \tilde λ_{ij} = 0.

The uniform-weighted version of the mean absolute odds ratio (MAOR) is defined as:

MAOR = \exp ≤ft[ √{ \frac{4}{ IJ (I-1) (J-1)} } φ \right]

The (marginal or other) weighted version is defined as:

MAOR = \exp ≤ft[ √{ \frac{4}{∑_{i = 1}^I ∑_{j = 1}^J P_{i+} (1 - P_{i+}) P_{+j} (1 - P_{+j})} } \tilde φ \right]

Per-cell contributions c_{ij} are defined so that \tilde φ = √{ ∑_{i = 1}^I ∑_{j = 1}^J c_{ij} }
and MAOR = exp ≤ft[ √{ ∑_{i = 1}^I ∑_{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.

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).

Author(s)

Milan Bouchet-Valat

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


logmult documentation built on March 18, 2022, 7:12 p.m.