Description Usage Arguments Value References Examples

These functions calculate sample size based on probability that upper limit is below level of concern. The idea behind this approach is to use precision to provide support for the absence of effect. These functions calculate sample size where, when the true effect is null, the upper limit of the confidence interval of the estimate of interest has a probability of being at or under a specified level of concern.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ```
upper_risk_difference(
upper_limit,
prob,
exposed,
unexposed,
group_ratio,
ci = 0.95
)
upper_risk_ratio(upper_limit, prob, exposed, unexposed, group_ratio, ci = 0.95)
upper_rate_difference(
upper_limit,
prob,
exposed,
unexposed,
group_ratio,
ci = 0.95
)
upper_rate_ratio(upper_limit, prob, exposed, unexposed, group_ratio, ci = 0.95)
upper_odds_ratio(
upper_limit,
prob,
exposed_cases,
exposed_controls,
group_ratio,
ci = 0.95
)
``` |

`upper_limit` |
The upper limit of the confidence interval, a level of concern. |

`prob` |
The probability of the estimated upper limit of the confidence interval being at or below the level of concern. |

`exposed` |
The risk or rate among the exposed cohort. |

`unexposed` |
The risk or rate among the unexposed cohort. |

`group_ratio` |
In cohort studies, the ratio of the unexposed to the exposed. In case-control studies, the ratio of the controls to the cases. |

`ci` |
The confidence interval as a probability or percent. Default is .95. |

`exposed_cases` |
The proportion of exposed cases. |

`exposed_controls` |
The proportion of exposed controls. |

a tibble with sample size, effect measure, upper limit, and probability

Rothman, K.J. and Greenland, S. 2018. Planning Study Size Based on Precision Rather Than Power. 29(5):599-603.

1 2 3 4 5 6 7 8 9 | ```
# From Rothman and Greenland 2018
upper_rate_ratio(
upper_limit = 2,
prob = .90,
exposed = .01,
unexposed = .01,
group_ratio = 1
)
``` |

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.