`GKtauDataframe`

returns the square matrix of Goodman and Kruskal
measures computed between each pair of columns in a dataframe. Numeric
variables in the dataframe are treated as factors.

1 | ```
GKtauDataframe(df, dgts = 3, includeNA = "ifany")
``` |

`df` |
Dataframe from which to compute association measures. |

`dgts` |
Integer, number of digits for results; optional (default = 3). |

`includeNA` |
Character, passed to useNA parameter for table; default is "ifany"; other valid options are "no" and "always" |

The Goodman and Kruskal tau measure is an asymmetric association measure between two categorical variables, based on the extent to which variation in one variable can be explained by the other. This function returns an S3 object of class 'GKtauMatrix' that gives the number of levels for each variable on the diagonal of the matrix and the association between variables in the off-diagonal elements. Note that this matrix is generally NOT symmetric, in contrast to standard correlation matrices.

An S3 object of class 'GKtauMatrix' consisting of a square matrix with one row and column for each column of the dataframe df. The structure of this matrix is:

row and column names are the names of the variables in the dataframe.

the diagonal matrix element contains the number of unique levels for the corresponding variable.

off-diagonal matrix elements contain the forward Goodman-Kruskal tau association from the variable listed in the row names to the variable listed in the column names.

Ron Pearson

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

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.