Skip to contents

Fits a non-parametric treatment-effect estimator based on the two-sample Wilcoxon rank-sum test: the point estimate is the Hodges-Lehmann location-shift estimate (the median of all pairwise treatment-minus-control differences \(y_{T,i} - y_{C,j}\)), and both the confidence interval and two-sided p-value are the standard rank-based Wilcoxon quantities from stats::wilcox.test() (normal approximation with continuity correction), not Wald intervals/tests built around the point estimate and a separately estimated standard error. Robust to outliers and does not assume normality or equal arm variances. Not supported for incidence (binary) responses (the Hodges-Lehmann estimator degenerates on 0/1 data — use InferenceAllSimpleAverageDiff or a conditional-logistic estimator instead) or censored survival data (use InferenceSurvivalGehanWilcox instead). This class has no likelihood tier (likelihood_tier = "none") and does not support the Bayesian bootstrap; its jackknife methods all report explicit non-estimability rather than computing a (statistically unreliable) delete-1 jackknife of the Hodges-Lehmann functional.

References

Hodges, J. L., and Lehmann, E. L. (1963). "Estimates of Location Based on Rank Tests." The Annals of Mathematical Statistics, 34(2), 598-611, doi:10.1214/aoms/1177704172 , for the Hodges-Lehmann estimator; Wilcoxon, F. (1945). "Individual Comparisons by Ranking Methods." Biometrics Bulletin, 1(6), 80-83, doi:10.2307/3001968 , for the underlying rank-sum test.

Super class

Inference -> InferenceAllSimpleWilcox

Methods

+ inherited public methods from Inference


InferenceAllSimpleWilcox$new()

Usage

InferenceAllSimpleWilcox$new(
  des_obj,
  model_formula = NULL,
  verbose = FALSE,
  max_resample_attempts = 50L,
  smart_cold_start_default = NULL
)

Arguments

des_obj

A completed Design object whose entire n subjects are assigned and response y is recorded within.

model_formula

Optional formula for covariate adjustment. If NULL (default), the formula from the design object is used and its pre-computed design matrix is reused. If a formula is provided, a new design matrix is constructed from the design's imputed covariates.

verbose

Whether to print progress messages.

smart_cold_start_default

Whether to use smart cold start values by default for likelihood-based models. Explicit starts always override this object-level policy. NULL (default) consults the global cold-start dispatch policy.


InferenceAllSimpleWilcox$compute_estimate()

Usage

InferenceAllSimpleWilcox$compute_estimate(estimate_only = FALSE)

Arguments

estimate_only

If TRUE, skip variance component calculations.


InferenceAllSimpleWilcox$compute_asymp_two_sided_pval()

Usage

InferenceAllSimpleWilcox$compute_asymp_two_sided_pval(delta = 0)

Arguments

delta

Null treatment effect.


InferenceAllSimpleWilcox$compute_asymp_confidence_interval()

Usage

InferenceAllSimpleWilcox$compute_asymp_confidence_interval(alpha = 0.05)

Arguments

alpha

Significance level.


InferenceAllSimpleWilcox$compute_jackknife_estimate()

Usage

InferenceAllSimpleWilcox$compute_jackknife_estimate(unit = "auto")


InferenceAllSimpleWilcox$compute_jackknife_bias_estimate()

Usage

InferenceAllSimpleWilcox$compute_jackknife_bias_estimate(unit = "auto")


InferenceAllSimpleWilcox$compute_jackknife_std_error()

Usage

InferenceAllSimpleWilcox$compute_jackknife_std_error(unit = "auto")


InferenceAllSimpleWilcox$compute_jackknife_wald_two_sided_pval()

Usage

InferenceAllSimpleWilcox$compute_jackknife_wald_two_sided_pval(
  delta = 0,
  unit = "auto"
)


InferenceAllSimpleWilcox$compute_jackknife_wald_confidence_interval()

Usage

InferenceAllSimpleWilcox$compute_jackknife_wald_confidence_interval(
  alpha = 0.05,
  unit = "auto"
)


InferenceAllSimpleWilcox$clone()

The objects of this class are cloneable with this method.

Usage

InferenceAllSimpleWilcox$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # \dontrun{
seq_des = DesignSeqOneByOneBernoulli$new(n = 6, response_type = "continuous")
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[1, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[2, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[3, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[4, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[5, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[6, 2 : 10])
seq_des$add_all_subject_responses(c(4.71, 1.23, 4.78, 6.11, 5.95, 8.43))

seq_des_inf = InferenceAllSimpleWilcox$new(seq_des)
seq_des_inf$compute_estimate()
} # }