计算Spearman相关性并更正p

我正在计算x和y变量之间的spearman相关性(两个数据集都有一些相同的值),使用R.我使用:

cor.test(x, y, method= "spearman")

我收到一条警告消息:

Cannot compute exact p-value with ties

我的x数据就像这样:0.84,0.84,0.07,0.173我的y数据是这样的:6,2,4,2

我想解决这个问题。 我读了这两个问题:

  • 斯皮尔曼相关和关系
  • Spearman的R领带中的cor.test是否正确?
  • 但我仍然无法解决我的问题。 你可以帮我吗? 我明白,也许我可以使用kendall而不是spearman,尽管使用相同的功能(将“spearman”更改为“Kendall”),我会得到相同的警告消息。 我也看到了一个答案,我想正确地计算矛兵是否可能或甚至没有关系? 非常感谢您的帮助。

    链接地址: http://www.djcxy.com/p/57759.html

    上一篇: Calculate Spearman correlation and corrected p

    下一篇: How should I interpret a Spearman's rank correlation significance of zero?