# [R] Query regarding R 'irr' package 'N.cohen.kappa'

Kalaivani Mani m@n|k@|@|v@n| @end|ng |rom gm@||@com
Thu Jun 16 11:42:31 CEST 2022

```Dear R-help Team,

I am from India and have a query on 'N.cohen.kappa' Sample size
calculations for Cohen's Kappa Statistic. I have calculated manually the
sample size using the formula mentioned in "Cantor, A. B. (1996)
Sample-size calculation for Cohen’s kappa. Psychological Methods, 1, 150-
153". Later came to know that it can be done using the R 'irr' package. I
got a different number.

Let us consider the following two situations:

For situation 1, the sample size is 1370 using R
Testing H0: kappa = 0.81 vs. HA: kappa> 0.95 given that kappa = 0.95 and
both raters classify 1.5% of subjects as positive.
R command used is: N.cohen.kappa(0.015, 0.015, 0.95, 0.81, alpha=0.05,
power=0.8, twosided=FALSE ).

But for the same situation, the sample size is much higher by manual
calculation, which is 8580.

For situation 2, the sample size is 74 by using R and is matching with the
manual calculation too.
Testing H0: kappa = 0.81 vs. HA: kappa> 0.95 given that kappa = 0.95 and
rater1 classify 40% of subjects and rate2 classify 50% of subjects as
positive.
R command used is: N.cohen.kappa(0.40, 0.50, 0.95, 0.81, alpha=0.05,
power=0.8, twosided=FALSE ).

I am attaching both the 'Excel sheet formula-kappa sample size situation1 &
2').

Why is this so? Please help me to sort this out.

Looking forward to hearing from you.

Best,
Kalaivani

--
*Dr. Kalaivani Mani, *

*M.Sc., Biostatistics (CMC, Vellore), Ph.D. (AIIMS, Delhi)*

*Scientist-IV*

*Dept. of Biostatistics*

*All India Institute of Medical Sciences*
*New Delhi-110029, India.*
*Mobile:91-9717319082*
```