# N2.cohen.kappa: Sample Size Calculation for Cohen's Kappa Statistic with more... In irr: Various Coefficients of Interrater Reliability and Agreement

## Description

This function calculates the required sample size for the Cohen's Kappa statistic when two raters have the same marginal. Note that any value of "kappa under null" in the interval [-1,1] is acceptable (i.e. k0=0 is a valid null hypothesis).

## Usage

 `1` ``` N2.cohen.kappa(mrg, k1, k0, alpha=0.05, power=0.8, twosided=FALSE) ```

## Arguments

 `mrg` a vector of marginal probabilities given by raters `k1` the true Cohen's Kappa statistic `k0` the value of kappa under the null hypothesis `alpha` type I error of test `power` the desired power to detect the difference between true kappa and hypothetical kappa `twosided` TRUE if test is two-sided

## Value

Returns required sample size.

## Author(s)

Puspendra Singh and Jim Lemon

## References

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, 321-325.

`N.cohen.kappa`, `kappa2`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ``` require(lpSolve) # Testing H0: kappa = 0.4 vs. HA: kappa > 0.4 (=0.6) given that # Marginal Probabilities by two raters are (0.2, 0.25, 0.55). # # one sided test with 80% power: N2.cohen.kappa(c(0.2, 0.25, 0.55), k1=0.6, k0=0.4) # one sided test with 90% power: N2.cohen.kappa(c(0.2, 0.25, 0.55), k1=0.6, k0=0.4, power=0.9) # Marginal Probabilities by two raters are (0.2, 0.05, 0.2, 0.05, 0.2, 0.3) # Testing H0: kappa = 0.1 vs. HA: kappa > 0.1 (=0.5) given that # # one sided test with 80% power: N2.cohen.kappa(c(0.2, 0.05, 0.2, 0.05, 0.2, 0.3), k1=0.5, k0=0.1) ```

### Example output

```Loading required package: lpSolve
 101
 136
 18
```

irr documentation built on May 2, 2019, 8:50 a.m.