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

View source: R/prevalencePower.R

This function can be used to establish how many participants are required to establish a prevalence rate with a given margin of error.

1 2 3 | ```
prevalencePower(expectedPrevalence,
marginOfError = 0.05,
conf.level = 0.95)
``` |

`expectedPrevalence` |
The expected prevalence. |

`marginOfError` |
The desired precision. |

`conf.level` |
The confidence of the confidence interval. |

Note that when uncertain as to the expected prevalence, it's better to assume a prevalence closer to 50%. Prevalences closer to 0% or 100% are easier to detect and therefore have more power.

The required number of participants.

Gjalt-Jorn Peters

Maintainer: Gjalt-Jorn Peters <[email protected]>

1 2 3 4 5 6 7 8 9 10 11 | ```
### Required participants for detecting a prevalence of 10%
### with a 95% confidence interval of 10% wide:
prevalencePower(.1);
### Required participants for detecting a prevalence of 10%
### with a 95% confidence interval of 4% wide:
prevalencePower(.1, .02);
### Required participants for detecting a prevalence of 60%
### with a 95% confidence interval of 10% wide:
prevalencePower(.6);
``` |

userfriendlyscience documentation built on Sept. 25, 2018, 9:05 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.