Compute a BCa bootstrap confidence interval for the Mann-Whitney parameter. The code is based on the slides found here: http://users.stat.umn.edu/~helwig/notes/bootci-Notes.pdf

bca_mannwhitney(
  treat,
  covar,
  out,
  nboot,
  treat_form,
  out_levels,
  out_form,
  mannwhitney_est,
  out_model,
  alpha = 0.05
)

Arguments

treat

A numeric vector containing treatment status. Missing values are not allowed unless the corresponding entry in out is also missing. Only values of 0 or 1 are treated as actual treatment levels. Any other value is assumed to encode a value for which the outcome is missing and the corresponding outcome value is ignored.

covar

A data.frame containing the covariates to include in the working proportional odds model.

out

A numeric vector containing the outcomes. Missing outcomes are allowed.

nboot

Number of bootstrap replicates used to compute bootstrap confidence intervals.

treat_form

The right-hand side of a regression formula for the working model of treatment probability as a function of covariates

out_levels

A numeric vector containing all ordered levels of the outcome.

out_form

The right-hand side of a regression formula for the working proportional odds model. NOTE: THIS FORMULA MUST NOT SUPPRESS THE INTERCEPT.

mannwhitney_est

The point estimate of the Mann-Whitney parameter.

out_model

Which R function should be used to fit the proportional odds model. Options are "polr" (from the MASS package), "vglm" (from the VGAM package), or "clm" (from the ordinal package).

alpha

Level of confidence interval.

Value

Confidence interval for the Mann-Whitney parameter