【问题标题】:test statistic for Spearman rank correlationSpearman 秩相关的检验统计量
【发布时间】:2013-03-02 16:57:33
【问题描述】:

我的问题是我计算了两个变量之间的 Spearman 等级相关性。一位审稿人问我是否可以为 p

这是一个结果:

> 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 

测试统计是否等于S = 911164.6?这么大的数字可以吗? 如果问题不是很专业,请提前抱歉,但我花了很多时间在书本和互联网上寻找答案。 :( 提前感谢您的帮助。

【问题讨论】:

  • 大概是秩差的平方和(参见关于 Spearman 秩相关的维基百科条目);我认为它的大小意味着你有一个大数据集......
  • 所以如果有人要求我也写测试统计数据,我可以写 S = 911164.6 和 rho= -0,335?
  • @MtS 我将您的问题标记为要迁移到 stats.stackexchange.com,但被拒绝了。尽管 BenBolker 和 RichieCotton 基本上已经回答了这个问题,但您可能想自己去那个网站并询问他们您的大 S 值。

标签: r statistics correlation


【解决方案1】:

是的。 ?cor.test 帮助页面(在“值”部分中)将来自 cor.test 的返回值描述为:

 A list with class ‘"htest"’ containing the following components:  

statistic:检验统计量的值。

调整该页面上的示例,我们看到

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 

统计数据由(n ^ 3 - n) * (1 - r) / 6 给出,其中n 是x 和r &lt;- cor(rank(x), rank(y)) 的长度。

【讨论】:

  • 感谢您的快速回答。所以我的 S 是 911164 可以吗?数量如此之多的原因可能是什么?
  • @MtS 这个具体的统计问题可能更适合stats.stackexchange.com,而不是这里,因为这里专注于编码。
  • 本可以将问题复制到另一边吗?
  • @MtS:阅读我更新的答案。 S 很大,因为你有很多数据,S 与输入向量的立方长度成正比。
  • 在维基百科中我发现可以使用以下方法测试重要性:rho*sqrt((n-2)/1-rho^2) 或 0.6*sqrt((9-2)/1 -0.6^2) = 1.546。这不是检验统计吗? :(
【解决方案2】:

我找到的最佳答案在页面上:Rpubs Spearman Rank Correlation

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

虽然论坛(n ^ 3 - n) * (1 - r) / 6,n 等于变量的样本量,r 等于计算 S 统计量的相关系数 (rho) 很清楚,但没有明确解释如何解释结果。我还没有找到明确的答案:(

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-02-11
    • 2015-06-28
    • 1970-01-01
    • 2018-01-01
    • 2018-11-04
    • 1970-01-01
    • 2021-06-18
    • 1970-01-01
    相关资源
    最近更新 更多