0
4 개의 서수 (0,1,2,3)와 다양한 연속 값의 상관 관계를 어떻게 분석해야합니까? 분산 형 플롯은 4 개의 평행 한 수평 점처럼 보입니다.Correaltion and regression analysis
4 개의 서수 (0,1,2,3)와 다양한 연속 값의 상관 관계를 어떻게 분석해야합니까? 분산 형 플롯은 4 개의 평행 한 수평 점처럼 보입니다.Correaltion and regression analysis
스피어 만 순위 상관 관계 테스트를 실행할 수 있습니다. 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
비 유의 한 상관 관계
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
예를 들어, 데이터, 바람직 코드 –
나는 데이터의 플롯을 업로드하고 싶지만 내가 때문에 저 명성 할 수 아니에요을 보여주십시오 이메일 보내시겠습니까? – user27379
원시 데이터 테이블을 표시 할 수 있습니까? 그렇게하면 다른 사람도 대답 할 수 있습니다. –