A categorical variable takes values in a finite or countable set of labels. A regression model usually represents an unordered categorical predictor by indicator variables relative to a reference level in a regression factor.
A categorical variable with two possible categories. Coding an event as one and its complement as zero makes the sample mean of that indicator variable equal to the event's sample proportion.
A categorical variable whose labels have no intrinsic ordering. Relabelling its categories does not change the underlying classification. An ordinal categorical variable additionally records an order; neither type automatically supplies equal numerical distances between categories.
A regression factor is a categorical variable encoded by indicator columns or treatment contrasts in a statistical model. A factor with observed levels normally contributes statistical degrees of freedom when an intercept is present. The reference level in a regression factor has coefficient zero under treatment contrasts. Coding a year as a factor permits arbitrary year effects rather than imposing a linear trend.
An ordinal categorical variable has categories with a meaningful order. Replacing its levels by numerical scores imposes a quantitative spacing and can replace several unrelated level effects by one regression coefficient when a linear trend is scientifically reasonable.
Reverse the order of exactly one of two ordinal categorical variables. Every concordant pair becomes a discordant pair and conversely, while pairs tied on either variable remain tied. Therefore the numerator changes sign and the denominator does not: Goodman and Kruskal's gamma changes sign whenever defined. The same argument applies to Somers' D, Kendall's tau-b and Stuart's tau-c, whose denominators depend on tie counts or table dimensions rather than the orientation. Reversing both orders preserves the sign. This explains why an association's numerical sign must be interpreted using the actual coding directions; it does not change the substantive paired observations. Measures of nominal association such as Cramér's V are invariant under either reversal.
For an contingency table of two ordinal categorical variables, write , for the sample size and for concordant pairs and discordant pairs. The coefficient is
It provides an ordinal association measure whose normalization accounts for the table dimensions. It generally differs from Kendall's tau-b and Goodman and Kruskal's gamma on a table with tied pairs. An association sign presupposes the chosen category ordering and is not a causal direction. The eponym is associated with Alan Stuart.[ref]
A family of ordinal association measures based on concordant pairs and discordant pairs. Without a tie adjustment, the coefficient is : the arithmetic mean, over unordered pairs, of the product of the two coordinate comparison signs. Reversing one ordering reverses the sign, and strictly increasing relabellings preserve it. Kendall's tau-b makes an explicit adjustment for tied pairs. The name commemorates Maurice Kendall.
Let count concordant pairs and discordant pairs, and let count pairs tied only on the indicated variable. Then
when both factors in the denominator are positive. Unlike Goodman and Kruskal's gamma, this coefficient accounts for ties. Its absolute value is at most one: form vectors of the comparison signs for all unordered pairs. Their inner product is and their squared norms are the two denominator factors, in reverse variable order. The Cauchy-Schwarz inequality supplies the bound. A variable constant throughout gives a zero denominator, not a meaningful zero association.[ref]
For observations of two ordered variables, every unordered pair is concordant, discordant, tied only on the first variable, tied only on the second variable, or tied on both. Consequently
The proof is an exhaustive partition: if neither coordinate is tied the two nonzero comparison signs agree or disagree; otherwise exactly one or both coordinates are tied. For contingency-table counts with row totals and column totals ,
Two records tied on both variables belong to each marginal tie total, so subtracting them once from each produces the exclusive . Using incompatible exclusive and inclusive conventions corrupts Somers' D and Kendall's tau-b even if the untied concordances are correct. The identities also provide a direct arithmetic check on a printed statistical summary.
Two observations tied on a variable have equal recorded values of that variable. For observations of two ordinal categorical variables, distinguish pairs tied only on the first, only on the second, or on both. Goodman and Kruskal's gamma excludes all such pairs, whereas Somers' D retains ties on the response when measuring directional predictive association. Consequently these coefficients can differ markedly for the same contingency table.
Here count concordant pairs and discordant pairs, and counts pairs tied on response but not on predictor . Somers' D divides by the number of pairs with distinct values, including pairs that the predictor separates but the response ties. Thus it is directional and generally changes when predictor and response are interchanged. For an contingency table with row predictor totals , that denominator is . The double-counting convention for concordances and discordances cancels the factor two.[ref]
For concordant pairs and discordant pairs, Goodman and Kruskal's gamma compares their difference with their total. It ranges from to when and discards all pairs tied in either variable. Reversing exactly one category ordering reverses its sign; reversing both leaves it unchanged. Zero gamma does not imply independence, and ignoring numerous ties can make its magnitude larger than a tie-adjusted measure.[ref]
For paired ordered observations and , the pair is concordant when : both coordinates increase in the same ordering. It is a discordant pair when this product is negative. Equality gives a tie in at least one coordinate. Counting these cases compares orderings without assuming meaningful equal distances between categories.
A pair with opposite orderings in its two coordinates; see the sign criterion in concordant pair.
An indicator variable of an event is one on and zero outside . Indicator columns encode categorical levels in a design matrix.

Articles by others on the same topic (0)

There are currently no matching articles.