Describing Association for Discrete Variables
Discrete variables can have one of two different qualities: 1. ordered categories 2. non-ordered categories
1. Ordered categories e.g., “High,” “Medium,” and “Low” [both variables must be ordered] 2. Non-ordered categories e.g., “Yes” and “No”
Relationships between two variables may be either 1. symmetrical or 2. asymmetrical
Symmetrical means that we are only interested in describing the extent to which two variables “hang around together” [non-directional] Symbolically, X Y
Asymmetrical means that we want a measure of association that yields a different description of X’s influence on Y from Y’s influence on X [directional] Symbolically, X Y Y X
Ordered Categories Asymmetrical Relationship No Yes Yule’s Q Cramer’s V Gamma (G) Lambda ( ) Somers’ d yx No Yes
For symmetrical relationships between two non-ordered variables, there are two choices: 1. Yule’s Q (for 2x2 tables) 2. Cramer’s V (for larger tables)
Respondents in the 1997 General Social Survey (GSS 1997) were asked: Were they strong supporters of any political party (yes or no)?; and, Did they vote in the 1996 presidential election (yes or no)? Party Identification Not Strong Strong Total Voting Voted a b a + b Turnout Not Voted c d c + d Total a + c b + d a+b+c+d
Party Identification Not Strong Strong Total Voting Voted Turnout Not Voted Total ,331
Q = [(339)(318) - (615)(59)] / [(339)(318) + (615)(59)] = [(107,801) - (36,285)] / [(107,801) + (36,285)] = (71,516) / (144,086) = 0.496
What does this mean? Yule’s Q varies from 0.00 (statistical independence; no association) to (perfect direct association) and – 1.00 (perfect inverse association)
Use the following rule of thumb (for now): 0.00 to 0.24"No relationship" 0.25 to 0.49"Weak relationship" 0.50 to 0.74"Moderate relationship" 0.75 to 1.00"Strong relationship" Yule’s Q = "... represents a moderate positive association between party identification strength and voting turnout."
Party Identification Not Strong Strong Total Voting Voted Turnout Not Voted Total ,331
What would be the value of Yule's Q? Q = [(954)(377) - (0)(0)] / [(954)(377) + (0)(0)] = [(359,658) - (0)] / [(359,658) + (0)] = (359,658) / (359,658) = 1.000
Party Identification Not Strong Strong Total Voting Voted Turnout Not Voted Total ,331
In this case, Yule's Q would be: Q = [(477)(189) - (477)(188)] / [(477)(189) + (477)(188)] = [(90,153) - (89,676)] / [(90,153) + (89,676)] = (477) / (179,829) = 0.003
Obviously Yule's Q can only be calculated for 2 x 2 tables. For larger tables (e.g., 3 x 4 tables having three rows and four columns), most statistical programs such as SAS report the Cramer's V statistic. Cramer's V has properties similar to Yule's Q, but since it is computed from 2 it cannot take negative values: Where min(R – 1) or (C – 1) means either number of rows less one or number of columns less one, whichever is smaller, and N is sample size.
In the example above, 2 = and Cramer's V is = 0.196
For asymmetrical relationships between two non-ordered variables, the statistic of choice is: Lambda ( )
Lambda is calculated as follows: = [(Non-modal responses on Y) - (Sum of non-modal responses for each category of X)] / (Non-modal responses on Y)
Party Identification Not Strong Strong Total Voting Voted Turnout Not Voted Total ,331
In this example, = [(377) - ( )] / (377) = [(377) - (377)] / (377) = (0) / (377) = 0.00
For symmetrical relationships between two variables having ordered categories, the statistic of choice is: Gamma (G)
where n s are concordant pairs and n d are discordant pairs
The concepts of concordant and discordant pairs are simple and are based on a generalization of the diagonal and off-diagonal in the Yule’s Q statistic.
To construct concordant pairs: "Starting with the upper right cell (i.e., the first row, last column in the table), add together all frequencies in cells below AND to the left of this cell, then multiply that sum by the cell frequency. Move to the next cell (i.e., still row one, but now one column to the left) and do the same thing. Repeat until there are NO cells to the left AND below the target cell. Then sum up all these products to form the value for the concordant pairs."
To illustrate, take the crosstabulation below which shows the relationship between a measure of social class and respondents' satisfaction with their current financial situation: Social Class Financially SatisfiedLowerWorking Middle UpperTotal Very well More or less Not at all Total ,442
Social Class Financially SatisfiedLowerWorking Middle UpperTotal Very well More or less Not at all Total ,442
For this table, the calculations are: 36 x ( ) = 35, x ( ) = 140, x ( ) = 8, x ( ) = 6, x ( ) = 79, x (43) = 13,287 These are NOT the value of the concordant pairs; they are the values that must be added together to determine the value of concordant pairs. n s = (35, , , , , ,287) n s = 283,730
To construct discordant pairs: "Starting with the upper left cell (i.e., the first row, first column in the table), add together all frequencies in cells below AND to the right of this cell, then multiply that sum by the cell frequency. Move to the next cell (i.e., still row one, but now one column to the right) and do the same thing. Repeat until there are NO cells to the left AND below the target cell. Then sum up all these products to form the value for the discordant pairs."
Social Class Financially SatisfiedLowerWorking Middle UpperTotal Very well More or less Not at all Total ,442
For the discordant pairs in this table, the calculations are: 10 x ( ) = 9, x ( ) = 59, x (19 + 7) = 6, x ( ) = 5, x (84 + 7) = 28, x (7) = 2,401 Again, these are NOT the value of the disconcordant pairs; they are the values that must be added together to determine the value of disconcordant pairs. n d = (9, , , , , ,401) n d = 111,248
G = [(283,730) - (111,248)] / [(283,730) + (111,248)] = (172,482) / (394,978) = 0.437
For asymmetrical relationships between two variables having ordered categories, the statistic of choice is: Somers’ d yx
For this crosstabulation, we specify Social Class (the column variable) as the independent variable (X) and Financial Satisfaction (the row variable) as the dependent variable (Y). Social Class (X) Financially Satisfied (Y)LowerWorking Middle UpperTotal Very well More or less Not at all Total ,442
Somers' d yx statistic is created by adjusting concordant and discordant pairs for tied pairs on the dependent variable (Y). In the example we have been using example, the only asymmetrical relationship that makes sense is one with the dependent variable (Y) as the row variable. Therefore Somers' d yx will be shown only for this situation, that is, for tied pairs on the row variable. (Tied pairs for the column variable follow the identical logic.) A tied pair is all respondents who are identical with respect to categories of the dependent variable but who differ on the category of the independent variable to which they belong. In the case of financial satisfaction, it is all respondents who express the same satisfaction level but who identify themselves with different social classes. In other words, for ties for a dependent row variable it is all the observations in the other cells in the same row.
The computational rule is: Target the upper left hand cell (in the first row, first column); multiply its value by the sum of the cell frequencies to right in the same row; move to the cell to the right and multiply its value by the sum of the cell frequencies to right in the same row; repeat until there are no more cells to the right in the same row; then move to the first cell in the next row (first column) and repeat until there are no more cells in the table having cells to the right. Add up these products.
Social Class Financially SatisfiedLowerWorking Middle UpperTotal Very well More or less Not at all Total ,442
Here, the products are: 10 x ( ) = 4, x ( ) = 37, x (36) = 9, x ( ) = 12, x ( ) = 111, x (19) = 6, x ( ) = 12, x (84 + 7) = 17, x (7) = 588 Thus, tied pairs (T r ) for rows equals T r = (4, , , , , , , , ) = 211,898
In this example, Somers' d yx = [(283,730) - (111,248)] / [(283,730) + (111,248) + (211,898)] = (172,482) / (606,976) = 0.284
Ordered Categories Asymmetrical Relationship No Yes Yule’s Q Cramer’s V Gamma (G) Lambda ( ) Somers’ d yx No Yes
Using SAS to Produce Two-Way Frequency Distributions and Statistics Using SAS to Produce Two-Way Frequency Distributions and Statistics libname mystuff 'a:\'; libname library 'a:\'; options formchar='|----|+|---+=|-/\ *' ps=66 nodate nonumber; proc freq data=mystuff.marriage; tables church*married / expected all; title1 ‘Crosstabulation for Discrete Variables'; run;
Crosstabulation for Discrete Variables TABLE OF CHURCH BY MARRIED CHURCH MARRIED Frequency| Expected | Percent | Row Pct | Col Pct |Divorced|Married |Never |Separate|Widowed | Total Annually | 74 | 269 | 129 | 18 | 43 | 533 | | | | | | | 5.09 | | 8.87 | 1.24 | 2.96 | | | | | 3.38 | 8.07 | | | | | | | Monthly | 30 | 149 | 50 | 10 | 26 | 265 | | | | | | | 2.06 | | 3.44 | 0.69 | 1.79 | | | | | 3.77 | 9.81 | | | | | | | Never | 32 | 85 | 34 | 6 | 16 | 173 | | | | | | | 2.20 | 5.85 | 2.34 | 0.41 | 1.10 | | | | | 3.47 | 9.25 | | | | | | 9.70 | Weekly | 34 | 289 | 63 | 17 | 80 | 483 | | | | | | | 2.34 | | 4.33 | 1.17 | 5.50 | | 7.04 | | | 3.52 | | | | | | | | Total
Crosstabulation for Discrete Variables STATISTICS FOR TABLE OF CHURCH BY MARRIED Statistic DF Value Prob Chi-Square Likelihood Ratio Chi-Square Mantel-Haenszel Chi-Square Phi Coefficient Contingency Coefficient Cramer's V Statistic Value ASE Gamma Kendall's Tau-b Stuart's Tau-c Somers' D C|R Somers' D R|C Pearson Correlation Spearman Correlation Lambda Asymmetric C|R Lambda Asymmetric R|C Lambda Symmetric Uncertainty Coefficient C|R Uncertainty Coefficient R|C Uncertainty Coefficient Symmetric Sample Size = 1454
Exercise Compute values for Lambda ( ), Gamma (G) and Somers' d yx for the following two-way frequency distribution. Assume that the row variable, self-described health, is the dependent (Y) variable. Education Degree Level Self-Described Health Less than H.S. H.S. Jr.Co. Col. Grad.Sch. Total Excellent Good Fair Poor Total ,458
Answers 1. The modal responses on Y (self-described health) are 696. Therefore, the non-modal responses are = 762. For each category of self-described health, the non-modal responses total 754. Therefore, Lambda = ( ) / 762 = Concordant pairs (n s ) = 320,060 and discordant pairs (n d ) = 130,272 Gamma = ( ) / ( ) = / = Tied pairs (T r ) = 227,737 Therefore, Somers' d yx = ( ) / ( ) = / = 0.280