# precision_risk_difference: Estimate precision of a measure based on sample size In precisely: Estimate Sample Size Based on Precision Rather than Power

## Description

These functions calculate the precision of an estimate given a certain sample size. For ratio measures, like the risk ratio, rate ratio, and odds ratio, this is the ratio of the upper to lower limit of the confidence interval. For difference measures, like the risk difference or rate difference, this is the absolute width of the confidence interval.

## Usage

 ``` 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``` ```precision_risk_difference( n_exposed, exposed, unexposed, group_ratio, ci = 0.95 ) precision_risk_ratio(n_exposed, exposed, unexposed, group_ratio, ci = 0.95) precision_rate_difference( n_exposed, exposed, unexposed, group_ratio, ci = 0.95 ) precision_rate_ratio(n_exposed, exposed, unexposed, group_ratio, ci = 0.95) precision_odds_ratio( n_cases, exposed_cases, exposed_controls, group_ratio, ci = 0.95 ) ```

## Arguments

 `n_exposed, n_cases` In cohort studies, the number of exposed participants. In case-control studies, the number of cases. `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.

## Value

a tibble with precision, effect measure, and sample size

## References

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

## Examples

 ```1 2 3 4 5 6 7 8``` ```# From Rothman and Greenland 2018 precision_odds_ratio( n_cases = 500, exposed_cases = .6, exposed_controls = .4, group_ratio = 2 ) ```

precisely documentation built on Oct. 10, 2021, 9:07 a.m.