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

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Fri Jun 17 02:10:56 CEST 2022


Hi Kalaivani,
The N.cohen.kappa function was written by Matthais Gamer, the
maintainer of the irr package. Both that function and N2.cohen.kappa
(written by Puspendra Singh) involve corrections that are described in
the references on the respective help pages. It is likely that there
will be small differences in the estimates for large N in the
different methods of calculation. I cannot advise which would best
suit your purpose as I only did testing and refining code in the
N2.cohen.kappa function. Perhaps corresponding directly with Matthais
Gamer would be your best option.

Jim

On Fri, Jun 17, 2022 at 2: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').
>
> 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*
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list