
Pocock and Simon's (1975) Minimization Sequential Design
Source:R/design_seq_one_by_one_pocock_simon.R
DesignSeqOneByOnePocockSimon.RdA DesignSeqOneByOne implementing Pocock and
Simon's minimization method: for each categorical covariate in strata_cols,
the design tracks a running treated/control count per covariate level
(private$counts), and for a new subject computes, for each candidate
treatment arm \(k \in \{0, 1\}\), a weighted total imbalance
$$G_k = \sum_{j} weights_j \cdot \mathrm{Var}\big(\text{counts at subject's level of covariate } j,
\text{ after hypothetically assigning arm } k\big),$$
where the variance is taken across the two treatment arms' hypothetical counts at
that covariate level (so \(G_k\) is large when arm \(k\) would leave the
subject's covariate-level counts unbalanced, summed with weights across
covariates). The subject is then assigned to whichever arm minimizes \(G_k\) with
probability p_best (and to the other arm with probability
1 - p_best), or — if the two arms are exactly tied — via a plain
\(\mathrm{Bernoulli}(prob\_T)\) draw. Unlike
DesignSeqOneByOneAtkinson/
DesignSeqOneByOneKK14, which use continuous
covariate distances, minimization operates on categorical/discretized strata and
balances marginal covariate-level counts directly rather than a multivariate
distance or matched-pair structure.
Level bookkeeping. private$ensure_factor_metadata() maintains a
mapping from each observed level of each strata_cols column to a row index
in private$counts (an (total levels across all covariates) x 2 matrix of
running treated/control counts), growing both the level map and counts as
new levels are encountered; missing values are treated as their own level
("NA").
Non-resampling bootstrap. draw_bootstrap_indices() always performs a
plain i.i.d. nonparametric bootstrap over subjects (sample_int_replace_cpp()),
since minimization's adaptive assignment process has no simple exchangeable
resampling unit to preserve (each subject's assignment probability depends on the
full sequence of covariate levels and assignments that preceded it).
References
Pocock, S. J., and Simon, R. (1975). "Sequential treatment assignment with balancing for prognostic factors in the controlled clinical trial." Biometrics, 31(1), 103-115, doi:10.2307/2529712 . See also minimisation (clinical trials) for orientation.
Super classes
Design -> DesignSeqOneByOne -> DesignSeqOneByOnePocockSimon
Methods
+ inherited public methods from DesignSeqOneByOne
+ inherited public methods from Design
Design$add_all_subject_responses()Design$add_one_subject_response()Design$any_censoring()Design$applicable_inference_class_names()Design$assert_all_responses_recorded()Design$assert_all_subjects_arrived()Design$assert_even_allocation()Design$assert_fixed_sample()Design$capabilities()Design$check_experiment_completed()Design$draw_ws_according_to_design()Design$duplicate()Design$get_X()Design$get_X_imp()Design$get_X_raw()Design$get_design_formula()Design$get_edi_version_created()Design$get_effective_dead()Design$get_effective_time()Design$get_missingness_method()Design$get_n()Design$get_ordinal_levels()Design$get_original_ordinal_levels()Design$get_prob_T()Design$get_response_type()Design$get_response_type_original()Design$get_t()Design$get_w()Design$get_y()Design$get_y_L()Design$get_y_R()Design$get_y_original()Design$has_general_censoring()Design$incompatible_inference_classes_due_to_design_structure()Design$is_a_bernoulli_capable()Design$is_a_cluster_capable()Design$is_a_kk_matching_capable()Design$is_blocking_design()Design$is_fixed_sample_size()Design$is_matching_design()Design$overwrite_all_subject_assignments()Design$prepare_for_resampling_replay()Design$randomization_family()Design$supports()Design$supports_randomization_draw()Design$supports_resampling()Design$supports_resampling_replay()Design$transform_y()Design$unavailable_inference_classes_due_to_missing_packages()Design$warm_all_subject_data_cache()
DesignSeqOneByOnePocockSimon$new()
Initialize a Pocock and Simon (1975) minimization sequential experimental design (see class documentation for the exact imbalance criterion and assignment rule).
Usage
DesignSeqOneByOnePocockSimon$new(
strata_cols,
weights = NULL,
p_best = 0.8,
response_type,
prob_T = 0.5,
include_is_missing_as_a_new_feature = TRUE,
n = NULL,
verbose = FALSE,
missingness_method = "impute",
design_formula = ~.,
seed = NULL
)Arguments
strata_colsThe names of the covariates to be used for minimization. These must be factor or categorical variables.
weightsA numeric vector of per-covariate weights \(weights_j\) in the imbalance criterion \(G_k\) (see class documentation), one per entry of
strata_cols, in the same order. Defaults to 1 for all (equal-weighted covariates).p_bestThe probability of assigning the treatment arm that minimizes \(G_k\) (see class documentation); the complementary arm is assigned with probability
1 - p_best. Defaults to 0.8 (an 80/20 biased coin favoring the balancing arm, rather than a fully deterministic minimization rule).response_typeThe data type of response values.
prob_TThe probability of the treatment assignment used only when the two arms' imbalance is exactly tied (see class documentation).
include_is_missing_as_a_new_featureFlag for missingness indicators.
nThe sample size.
verboseFlag for verbosity.
missingness_methodHow to handle missing values in covariates.
design_formulaA formula object.
seedInteger seed for reproducibility.
DesignSeqOneByOnePocockSimon$assign_wt()
Draw the next subject's treatment assignment via Pocock and
Simon minimization (see class documentation for the exact imbalance
criterion \(G_k\) and the p_best/prob_T assignment rule),
and update the running per-covariate-level treated/control counts
in-place to reflect this assignment.
Examples
seq_des = DesignSeqOneByOnePocockSimon$new(strata_cols = 'x1', n = 6, response_type = 'continuous')
seq_des$add_one_subject_to_experiment_and_assign(data.frame(x1 = factor(1, levels=1:2)))
#> [1] 0