
Simple Wilcoxon Rank-Sum (Hodges-Lehmann) Inference
Source:R/inference_all_simple_wilcox.R
InferenceAllSimpleWilcox.RdFits 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
Public methods
+ inherited public methods from Inference
Inference$capabilities()Inference$compute_exact_confidence_interval()Inference$compute_exact_two_sided_pval_for_treatment_effect()Inference$duplicate()Inference$get_analysis_data()Inference$get_covariates()Inference$get_design_object()Inference$get_model_formula()Inference$get_nonestimable_reason()Inference$get_nonestimable_stage()Inference$get_optimization_alg()Inference$get_response()Inference$get_response_type()Inference$get_treatment()Inference$is_nonestimable()Inference$set_optimization_alg()Inference$set_seed()Inference$supports()
InferenceAllSimpleWilcox$new()
Usage
InferenceAllSimpleWilcox$new(
des_obj,
model_formula = NULL,
verbose = FALSE,
max_resample_attempts = 50L,
smart_cold_start_default = NULL
)Arguments
des_objA completed
Designobject whose entire n subjects are assigned and response y is recorded within.model_formulaOptional 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.verboseWhether to print progress messages.
smart_cold_start_defaultWhether 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.
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()
} # }