spearman correlation coefficient

2019-03-12  本文已影响0人  赵会成

(斯皮尔曼相关性系数)

斯皮尔曼相关性系数,通常也叫斯皮尔曼秩相关系数。“秩”,可以理解成就是一种顺序或者排序,那么它就是根据原始数据的排序位置进行求解,这种表征形式就没有了求皮尔森相关性系数时那些限制

> n <- 10

> x <- rnorm(n)

> y <- rnorm(n)

> cor(x,y)

[1] -0.4132864

> cor.test(x,y)

Pearson's product-moment correlation

data: x and y

t = -1.2837, df = 8, p-value = 0.2352

alternative hypothesis: true correlation is not equal to 0

95 percent confidence interval:

-0.8275666 0.2924366

sample estimates:

cor

-0.4132864

上一篇 下一篇

猜你喜欢

热点阅读