Description Usage Arguments Details Value Author(s) References See Also Examples

Similarities between variables used for clustering are calculated by this function. For each combination of different data types, an appropriate measure for association is chosen, see details.

1 | ```
association(x, y)
``` |

`x` |
vector of class |

`y` |
vector of class |

The following association measures for respective types of variables are chosen:

quantitative vs quantitative/ordinal: absolute Spearman correlation coefficient

ordinal vs ordinal: absolute Goodman and Kruskal's gamma coefficient (Goodman and Kruskal, 1954)

quantitative/ordinal vs binary: absolute Goodman and Kruskal's gamma coefficient

quantitative vs categorical (>2 categories): The categories of the categorical variable are reordered with respect to average ranks of the quantitative variable within those categories. Then absolute Spearman correlation coefficient is calculated as if it was an ordered factor. To avoid over-optimism, the reordering is only applied if a Kruskal-Wallis pre-test of association yields a significant result (p<0.05).

ordinal vs categorical (>2 categories): as for 'quantitative vs categorical', but instead of Spearman correlation the absolute Goodman and Kruskal's gamma coefficient is calculated

categorical vs categorical: Also in this case the reordering strategy is applied by "diagonalizing" the cross-table between the two factors (see

`optile`

from the`extracat`

package). Association is then measured by absolute Goodman and Kruskal's gamma coefficient. To avoid over-optimism, the reordering is only applied if a chi-square pre-test of association yields a significant result (p<0.05).

Estimated value of association between `x`

and `y`

Manuela Hummel

Goodman LA and Kruskal WH (1954). Measures of association for cross classifications. Journal of the American Statistical Association, 49:732-764.

`similarity.variables`

, `dist.variables`

,

1 2 3 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.