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

Bert Gunter bgunter@4567 @end|ng |rom gm@||@com
Thu Jun 16 18:29:44 CEST 2022

```---------- Forwarded message ---------
From: Bert Gunter <bgunter.4567 using gmail.com>
Date: Thu, Jun 16, 2022 at 9:28 AM
Subject: Re: [R] Query regarding R 'irr' package 'N.cohen.kappa'
To: Kalaivani Mani <manikalaivani using gmail.com>

came through, because most attachments are stripped due to security
concerns. The PG tells you which attachments are allowed.

We don't do Excel here. This is R-help. Do and show your manual
calculations in R.

Cheers,
Bert

On Thu, Jun 16, 2022 at 9:20 AM Kalaivani Mani <manikalaivani using gmail.com>
wrote:

> 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').
>
>
> 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*
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help