GKtau: Compute Goodman and Kruskal tau measure of association.
Description
GKtau returns forward and backward Goodman and Kruskal tau measures
between categorical variables.
Usage
GKtau(x, y, dgts = 3, includeNA = "ifany")
Arguments
x
A categorical vector (factor).
y
A categorical vector (factor).
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"
Value
A one-row dataframe with the following columns:
the names of the x and y variables,
the numbers of distinct values Nx and Ny for each variable, and
the forward and backward associations, tau(x,y) and tau(y,x).
Details
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 a
dataframe with both forward and backward associations.