Learn R Programming

door (version 0.0.2)

halperin_ci: Calculate confidence interval of DOOR probability based on Halperin et al. (1989)'s method

Description

Calculate confidence interval of DOOR probability based on Halperin et al. (1989)'s method

Usage

halperin_ci(
  y1 = NULL,
  y2 = NULL,
  n1 = NULL,
  n2 = NULL,
  data_type = c("freq", "prop"),
  summary_obj = NULL,
  conf_level = 0.95
)

Value

Halperin et al. (1989)'s CI

Arguments

y1, y2

Numeric vectors of DOOR proportion or frequency distribution for group 1, group 2. The entries should be ordered from most desirable to least desirable

n1, n2

Sample sizes of group 1, group 2; must be specified if data_type = "prop"

data_type

Either "freq" for frequency input or "prop" for proportion input when using y1 and y2

summary_obj

A object returned by door_summary(); Alternative input for y1 and y2

conf_level

Confidence level

References

reference

See Also

door_ci()

Examples

Run this code
y1 = c(60, 30, 10)
y2 = c(50, 40, 10)
halperin_ci(y1, y2)

## $halperin_ci
## [1] 0.4734504 0.6147386

Run the code above in your browser using DataLab