Skip to contents

The Mann-Whitney estimand is the tie-adjusted probability of a randomly selected individual from the population of treated individuals having a an outcome with a higher outcome category level than a randomly selected individual from the population of control individuals.

Usage

mw_from_pmfs(pmf_0, pmf_1, reverse_scale = FALSE)

Arguments

pmf_0

A vector containing the PMF of outcomes in the control population, i.e. Pr(Y = 1 | A = 0), Pr(Y = 2 | A = 0), ...

pmf_1

A vector containing the PMF of outcomes in the treated population, i.e. Pr(Y = 1 | A = 1), Pr(Y = 2 | A = 1), ...

reverse_scale

(Scalar: Logical) Should the scales be reversed when calculating the Mann-Whitney estimand? This may be useful when lower categories indicate a preferable outcome.

Value

A scalar containing the Mann-Whitney Estimand

Examples

mw_from_pmfs(
  pmf_0 = c(0.1, 0.1, 0.2, 0.6),
  pmf_1 = c(0.2, 0.2, 0.3, 0.3)
)
#> [1] 0.34

mw_from_pmfs(
  pmf_0 = c(0.1, 0.1, 0.2, 0.6),
  pmf_1 = c(0.2, 0.2, 0.3, 0.3),
  reverse_scale = TRUE
)
#> [1] 0.66