Description Usage Arguments Value Author(s) References See Also Examples

View source: R/N2.cohen.kappa.R

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).

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

`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 |

Returns required sample size.

Puspendra Singh and Jim Lemon

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.

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)
``` |

```
Loading required package: lpSolve
[1] 101
[1] 136
[1] 18
```

irr documentation built on May 30, 2017, 3:13 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.