door_test {door}R Documentation

Hypothesis testing for the DOOR probability

Description

Hypothesis testing for the DOOR probability

Usage

door_test(
  y1 = NULL,
  y2 = NULL,
  n1 = NULL,
  n2 = NULL,
  summary_obj = NULL,
  data_type = c("freq", "prop"),
  null_value = 0.5,
  alternative = c("two.sided", "less", "greater")
)

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 method = "prop"

summary_obj

An object returned by individual_to_summary(); Alternative input for y1 and y2

data_type

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

null_value

A number specifying the hypothesized value of the DOOR probability

alternative

A character describing the alternative hypothesis

Value

A htest object containing information of hypothesis test of DOOR probability

See Also

door_summary()

Examples

y1 <- c(60, 30, 10)
y2 <- c(50, 40, 10)
door_test(y1 = y1, y2 = y2)

## Hypothesis test for DOOR probability
## data:  y1 and y2
## WMW statistic = 1.2372, p-value = 0.216
## alternative hypothesis: true  is not equal to 0.5
## sample estimates:
## DOOR probability
##	           0.545

[Package door version 0.0.2 Index]