Calculations

Below is documentation for each of the implemented calculation functionalities for summary data.

Measures

risk_ci(events, total[, alpha, confint]) Calculate two-sided risk confidence intervals
incidence_rate_ci(events, time[, alpha]) Calculate two-sided incidence rate confidence intervals.
risk_ratio(a, b, c, d[, alpha]) Calculates the risk ratio and confidence intervals from count data.
risk_difference(a, b, c, d[, alpha]) Calculates the risk difference and confidence intervals from count data.
number_needed_to_treat(a, b, c, d[, alpha]) Calculates the number needed to treat and confidence intervals from count data.
odds_ratio(a, b, c, d[, alpha]) Calculates the odds ratio and confidence interval from count data
incidence_rate_ratio(a, c, t1, t2[, alpha]) Calculates the incidence rate ratio and confidence intervals from count data
incidence_rate_difference(a, c, t1, t2[, alpha]) Calculates the incidence rate difference and confidence intervals from count data
attributable_community_risk(a, b, c, d) Calculates the estimated attributable community risk (ACR) from count data.
population_attributable_fraction(a, b, c, d) Calculates the population attributable fraction (PAF) from count data

Diagnostics

sensitivity(detected, cases[, alpha, confint]) Calculate the sensitivity from number of detected cases and the number of total true cases.
specificity(detected, noncases[, alpha, confint]) Calculate the specificity from number of false detections and the number of total non-cases.
ppv_converter(sensitivity, specificity, …) Generates the positive predictive value from designated sensitivity, specificity, and prevalence.
npv_converter(sensitivity, specificity, …) Generates the negative predictive value from designated sensitivity, specificity, and prevalence.
screening_cost_analyzer(cost_miss_case, …) Compares the cost of sensivitiy/specificity of screening criteria to treating the entire population as test-negative and test-positive.

Others

probability_to_odds(prob) Converts given probability (proportion) to odds
odds_to_probability(odds) Converts given odds to probability (proportion)
counternull_pvalue(estimate, lcl, ucl[, …]) Calculates the counternull p-value.
semibayes(prior_mean, prior_lcl, prior_ucl, …) A simple Bayesian Analysis.
rubins_rules(point_estimates, std_error) Function to merge multiple imputed data sets into a single summary estimate and variance.
s_value(pvalue) Function to calculate the S-value.