I have conducted Spearman's Rho tests with two ordinal variables (one with 4 possible answers and the other with 6). I have obtained a statistically significant correlation between the two. My question is, how can I graphically (or some other way) determine which answer of each correlate together - as a scatterplot would not work with my data (since it is not scale).


2 Answers 2


Let's create some toy data in R:

> set.seed(1)
> nn <- 60
> xx <- floor(4*runif(nn))+1
> yy <- pmin(6,pmax(1,xx+rnorm(nn,0,3)))
> Q1 <- ordered(letters[xx],levels=letters[1:4])
> Q2 <- ordered(LETTERS[yy],levels=LETTERS[1:6])

Here is a Spearman's rho correlation test:

> cor.test(as.numeric(Q1),as.numeric(Q2),method="spearman")

        Spearman's rank correlation rho

data:  as.numeric(Q1) and as.numeric(Q2)
S = 24468, p-value = 0.01264
alternative hypothesis: true rho is not equal to 0
sample estimates:

In cor.test.default(as.numeric(Q1), as.numeric(Q2), method = "spearman") :
  Kann exakten p-Wert bei Bindungen nicht berechnen

Now, one way of understanding this would be a simple incidence table:

> table(Q1,Q2)
Q1   A  B  C  D  E  F
  a 10  1  1  0  1  0
  b  6  2  1  1  2  5
  c  4  3  3  4  1  1
  d  3  2  2  1  4  2

Alternatively, you can certainly plot your data. Simply transform them to the underlying integers and add a little jittering:

> delta <- 0.2
> plot(as.numeric(Q1)+runif(nn,-delta,delta),as.numeric(Q2)+runif(nn,-delta,delta),pch=19,xlab="Q1",ylab="Q2",xaxt="n",yaxt="n")
> axis(1,1:4,levels(Q1))
> axis(2,1:6,levels(Q2),las=2)


Alternatively, create a sunflowerplot:



(To be honest, I'm not too keen on the default sunflowerplot, but you can customize the colors and the widths of the segments rather well, see ?sunflowerplot.)

  • $\begingroup$ Thanks for this, but would I be able to do this in spss? $\endgroup$
    – Dragonfly
    Apr 8, 2017 at 18:54
  • 1
    $\begingroup$ Possibly. I have zero idea about SPSS. Maybe someone will come along and add an SPSS answer, or you could post a question at StackOverflow in the "SPSS" tag, pointing back to this thread. $\endgroup$ Apr 8, 2017 at 18:56

Sometimes people overlook the convenient way in which a Chi-square procedure can answer questions like this. Specifically, each of your 24 cells' Chi-square residuals -- or better yet, standardized residuals -- will tell to what extent the count of observations in that cell is disproportionate, given the entire bivariate distribution. In SPSS:

cross Q1 by Q2 / stat chi /cells count sresid.

Standardized residuals beyond +/- 2 are typically the ones that signal notably disproportionate counts (although this is only a rule of thumb). You'll probably be most interested in values >2 since you want to know which pairs of answers tend to co-occur.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.