How should I analysis the correlation between four ordinal numbers (0,1,2,3) and various range of the continuous values? The scatter plot looks like a 4 parallel horizontal dots .
Asked
Active
Viewed 125 times
0
-
Please show example data, and preferably code – Ben Allison Feb 20 '14 at 16:23
-
I would like to upload the plot of data but I am not able because of low reputation, can I have your email? – user27379 Feb 21 '14 at 10:21
-
Can you show the raw data table? That way someone else might be able to answer too. – Ben Allison Feb 21 '14 at 11:14
-
data1(0.045812) data2(.00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 1.00 .00 1.00 .00 .00 .00 .00 .00 1.00 .00 2.00 2.00 .00 1.00 .00 2.00 .00 .00 .00 .00 1.00 .00 .00 .00 1.00 .00 2.00 2.00 .00 .00 2.00 .00 1.00 1.00 2.00 2.00 2.00 1.00 2.00 2.00 .00 .00 .00 1.00 .00 1.00 2.00 .00 1.00 .00 1.00 .00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 3.00 3.00 2.00 1.00 1.00 1.00 .00 2.00 1.00 .00 2.00 .00 .00 2.00 .00 .00 1.00 .00 2.00 .00 .00 .00 .00 1.00 2.00 2.00 2.00 .00 1.00 1.00 2.00 2.00 – user27379 Mar 05 '14 at 17:36
1 Answers
0
You could run a Spearman rank correlation test. Using R,
require(pspearman)
x <- c(rep("a", 5), rep("b", 5), rep("c", 5), rep("d", 5))
x <- factor(x, levels=c("a", "b", "c", "d"), ordered=T)
y <- 1:20
spearman.test(x, y)
Spearman's rank correlation rho
data: x and y
S = 40.6203, p-value = 6.566e-06
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
0.9694584
Warning message:
In spearman.test(x, y) : Cannot compute exact p-values with ties
Non-significant correlation
set.seed(123)
y2 <- rnorm(20)
spearman.test(x, y2)
Spearman's rank correlation rho
data: x and y2
S = 1144.329, p-value = 0.5558
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
0.139602
Warning message:
In spearman.test(x, y2) : Cannot compute exact p-values with ties

Whitebeard
- 5,945
- 5
- 24
- 31