Ordinal data

The ASTA team

Association between ordinal variables

Ordinal variables

For a random sample of black males the General Social Survey in 1996 asked two questions:

Both measurements are on an ordinal scale.

  VeryD LittleD ModerateS VeryS
< 15k 1 3 10 6
15-25k 2 3 10 7
25-40k 1 6 14 12
> 40k 0 1 9 11

We might do a chi-square test to see whether Q1 and Q2 are associated, but the test does not exploit the ordinality.

We shall consider a test that incorporates ordinality.

Gamma coefficient

Consider a pair of respondents, where respondent1 is below respondent2 in relation to Q1.

Let

We define the estimated gamma coefficient \[\hat{\gamma} = \frac{C-D}{C+D} = \underbrace{\frac{C}{C+D}}_{concordant~prop.} - \underbrace{\frac{D}{C+D}}_{discordant~prop.}\]

Gamma coefficient

Properties:

The standard error \(se({\hat{\gamma}})\) on \({\hat{\gamma}}\) is complicated to calculate, so we leave that to software.

We can now determine a 95% confidence interval: \[{\hat{\gamma}}\pm 1.96se({\hat{\gamma}})\] and if zero is contained in the interval, then there is no significant association, when we perform a test with a 5% significance level.

Example

First, we need to install the package vcdExtra, which has the function GKgamma for calculating gamma. It also has the dataset on job satisfaction and income built-in:

library(vcdExtra)
JobSat
##         satisfaction
## income   VeryD LittleD ModerateS VeryS
##   < 15k      1       3        10     6
##   15-25k     2       3        10     7
##   25-40k     1       6        14    12
##   > 40k      0       1         9    11
GKgamma(JobSat, level = 0.90)
## gamma        : 0.221 
## std. error   : 0.117 
## CI           : 0.028 0.414

A positive association. Marginally significant at the 10% level, but not so at the 5% level.