데이터 프레임에서 db
데이터 프레임에서 scoreA
및 scoreB
의 범위에서 2 가지 방법으로 점수를 계산합니다. 코헨의 카파 계수를 얻고 싶습니다.정신을 가진 코헨의 카파 계산시 경고
CRAN에 여러 라이브러리가 있지만 임의로 psych
을 선택했습니다.
library(psych)
cohen.kappa(table(db$scoreA, db$scoreB))
Call: cohen.kappa1(x = x, w = w, n.obs = n.obs, alpha = alpha, levels = levels)
Cohen Kappa and Weighted Kappa correlation coefficients and confidence boundaries
lower estimate upper
unweighted kappa 0.91 0.91 0.91
weighted kappa 0.97 0.97 0.97
Number of subjects = 59204
Warning message:
In any(abs(bounds)) : coercing argument of type 'double' to logical
내가 경고에 대한 걱정해야 : 여기
내 코드? 무슨 뜻이에요 ?편집 : 방금 fmsb
으로 시도했으며 가중치가없는 카파 (십진수의 경우에도)와 동일한 값을 얻었습니다. wheeded 카파에 문제가있는 경우 질문은 계속 진행됩니다.
library(fmsb)
Kappa.test(db$scoreA, db$scoreB)
$Result
Estimate Cohen kappa statistics and test the null hypothesis that the
extent of agreement is same as random (kappa=0)
data: db$scoreA and db$scoreB
Z = 383.67, p-value < 2.2e-16
95 percent confidence interval:
0.9077865 0.9131626
sample estimates:
[1] 0.9104745
$Judgement
[1] "Almost perfect agreement"
감사합니다. 귀하의 요점은 매우 분명합니다. 그래서 당신이 말하는 것을 바탕으로, 내 점수가 바이너리가 아니기 때문에 나는 코헨의 카파가 필요하지 않은 것 같습니다. 그럼 너는 무엇을 권 하겠는가? –
몇 가지 연구가 끝나면 [여기] (http://www.cookbook-r.com/Statistical_analysis/Inter-rater_reliability)에서 설명한대로 Cohen 's kappa를 비 이진 점수로 사용할 수 있습니다. 그래서'db $ scoreA = c (059735260,2)'라면 논리적으로는 안됩니다. 그렇지 않습니까? –