Diagnostic Accuracy and Agreement
Plan the number of subjects needed to test agreement between two raters using Cohen's kappa. This calculator follows the large-sample method used by this method: the category marginal frequencies are supplied in advance, the maximum asymptotic standard error is determined under both the null and alternative kappa values, and the resulting sample size is rounded up.
Cohen's kappa measures agreement between two raters for nominal categories after accounting for agreement expected by chance. For category probabilities pi· and p·i, the expected agreement is pe = Σipi·p·i, while the observed agreement is the sum of the diagonal cell probabilities. Kappa is:
For sample-size planning, the Flack, Afifi, Lachenbruch, and Schouten approach used by this method assumes equal marginal category frequencies for the two raters. For each hypothesized kappa, the method constructs the joint cell probabilities consistent with those marginals and the implied observed agreement, then maximizes the asymptotic variance component over the feasible contingency tables. If τ0 and τ1 are the resulting maximum standard-deviation factors under κ0 and κ1, the large-sample sample-size equation is:
The maximization is performed in the browser with a small linear-programming solver. This mirrors the optimization in the reference implementation of N2.cohen.kappa, which uses the same Flack et al. framework. The calculation is not a simple plug-in approximation based only on κ and the number of categories; the anticipated marginal frequencies materially affect the required sample size.
This worked example uses a two-sided test with α = 0.05, power = 0.95, κ0 = 0.40, three categories with frequencies 0.40, 0.50, and 0.10, and alternative kappa values 0.50, 0.60, and 0.70. The published this method output gives required evaluable sample sizes of 983, 228, and 92, respectively.
Flack, V.F., Afifi, A.A., Lachenbruch, P.A., & Schouten, H.J.A. (1988). Sample Size Determinations for the Two Rater Kappa Statistic. Psychometrika, 53(3), 321–325. doi:10.1007/BF02294215.
Cohen, J. (1960). A Coefficient of Agreement for Nominal Scales. Educational and Psychological Measurement, 20(1), 37–46.
the software, LLC. this method: Kappa Test for Agreement Between Two Raters, Chapter 811. the relevant methodological literature describes the Flack et al. (1988) method, its maximum-standard-error approach, and validation examples.
Singh, P. & Lemon, J. irr R package, N2.cohen.kappa. The implementation explicitly maximizes the standard-error component over feasible joint category probabilities and applies the Flack et al. sample-size equation.