简体   繁体   English

Spearman 等级相关性的检验统计量

[英]test statistic for Spearman rank correlation

my problem is that I have calculated Spearman rank correlations between two variables.我的问题是我已经计算了两个变量之间的 Spearman 等级相关性。 One reviewer asked me if I could add also test statistics for all coefficients where p < 0.001.一位评论者问我是否可以为 p < 0.001 的所有系数添加检验统计量。

Here is one result:这是一个结果:

> cor.test(pl$data, pl$rang, method= "spearman")


#       Spearman's rank correlation rho

data:  pl$data and pl$rang
S = 911164.6, p-value = 1.513e-05
alternative hypothesis: true rho is not equal to 0 
sample estimates:
rho 
-0.3347658 

Is the test statistics equal to S = 911164.6 ?测试统计是否等于S = 911164.6 Is it OK that it is so big number?这么大的数字可以吗? Sorry in advance if the question is not very professional but I spend quite some time searching for the answers in the books and on internet.如果问题不是很专业,请提前抱歉,但我花了很多时间在书籍和互联网上寻找答案。 :( Thank you for the help in advance. :( 提前感谢您的帮助。

Yes.是的。 The ?cor.test help page (in the Value section) describes the return value from cor.test as: ?cor.test帮助页面(在 Value 部分)将cor.test的返回值描述为:

 A list with class '"htest"' containing the following components:

statistic: the value of the test statistic.统计量:检验统计量的值。

Adapting the example on that page, we see修改该页面上的示例,我们看到

x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1)
y <- c( 2.6,  3.1,  2.5,  5.0,  3.6,  4.0,  5.2,  2.8,  3.8)
(result <- cor.test(x, y, method = "spearman"))
#         Spearman's rank correlation rho

# data:  x and y 
# S = 48, p-value = 0.0968
# alternative hypothesis: true rho is not equal to 0 
# sample estimates:
# rho 
# 0.6 
result$statistic
#  S 
# 48 

The statistic is given by (n ^ 3 - n) * (1 - r) / 6 where n is the length of x and r <- cor(rank(x), rank(y)) .统计量由(n ^ 3 - n) * (1 - r) / 6 ,其中nxr <- cor(rank(x), rank(y))的长度。

The best answer I have found is on the page: Rpubs Spearman Rank Correlation我找到的最佳答案在页面上: Rpubs Spearman Rank Correlation

This question is also on Cross Validated "Interpreting the Spearman's Rank Correlation Coefficient output in R. What is 'S'?"这个问题也在Cross Validated “Interpreting the Spearman's Rank Correlation Coefficient output in R.What is 'S'?”

While the forumla (n ^ 3 - n) * (1 - r) / 6 , were n is equal to the sample size of variables and r is equal to the correlation coefficient (rho) for calculting the S statistic is clear, there is no clear explaination on how to interpret the results.虽然论坛(n ^ 3 - n) * (1 - r) / 6 ,如果n等于变量的样本大小并且r等于用于计算 S 统计量的相关系数 (rho),则很清楚,有没有关于如何解释结果的明确解释。 I have yet to find a clear answer :(我还没有找到明确的答案:(

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM