proportion_difference_fraction: Calculate the confidence interval of a difference in...

View source: R/proportion_difference.R

proportion_difference_fractionR Documentation

Calculate the confidence interval of a difference in proportions (e.g. sensitivity or specificity)

Description

This is a wrapper around proportion_difference() that permits use of a numerator and denominator rather than true calls and false calls.

Usage

proportion_difference_fraction(
  numerator_1,
  denominator_1,
  numerator_2,
  denominator_2,
  interval = 0.95,
  digits = 0.1
)

Arguments

numerator_1

The numerator of the first proportion of interest. Typically the number of true calls for a proportion such as PPA or NPA.

denominator_1

The total number of calls for the first proportion of interest.

numerator_2

The numerator of the second proportion of interest. Typically the number of true calls for a proportion such as PPA or NPA.

denominator_2

The total number of calls for the second proportion of interest.

interval

The confidence interval to calculate. Defaults to 0.95 for 95%.

digits

The number of digits to round to. Defaults to 0.1.

Value

A list containing the estimated difference, the confidence interval, a boolean attribute indicating whether or not a difference was detected at the specified confidence (difference_detected), and various strings and formatted percents that can be used to convey the information.

Examples

proportion_difference_fraction(
   numerator_1 = 99,
   denominator_1 = 100,
   numerator_2 = 79,
   denominator_2 = 80,
   interval = 0.95
)

bjoleary/dxr documentation built on Dec. 5, 2023, 8:33 p.m.