Calculates sample size for demonstrating freedom or detecting disease using the appropriate method, depending on whether or not N provided (hypergeometric if N provided, binomial otherwise), assuming imperfect test sensitivity, perfect test specificity and representative sampling

1 |

`N` |
population size, default = NA (unknown) (scalar or vector of same length as sep) |

`sep` |
desired population sensitivity (scalar or vector) |

`pstar` |
specified design prevalence as proportion or integer (scalar or vector of same length as sep) |

`se` |
unit sensitivity (scalar or vector of same length as sep) |

vector of sample sizes, NA if N is specified and n>N

1 2 3 4 5 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.