precision_risk_difference: Estimate precision of a measure based on sample size
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
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