
Efron's (1971) Biased Coin Sequential Design
Source:R/design_seq_one_by_one_efron.R
DesignSeqOneByOneEfron.RdA DesignSeqOneByOne implementing Efron's (1971)
biased coin: no covariates are used, only the running counts of treated
(\(n_T\)) and control (\(n_C\)) subjects assigned so far. If the counts are
currently equal, the next subject is assigned by a fair \(\mathrm{Bernoulli}(0.5)\)
coin; otherwise, the next subject is assigned to the currently
under-represented group with probability weighted_coin_prob
(in \((0.5, 1]\), e.g. the classical \(2/3\)) and to the over-represented group with
probability 1 - weighted_coin_prob. This keeps the running treatment/control
counts close to balanced throughout enrollment (unlike
DesignSeqOneByOneBernoulli, whose
running counts can drift arbitrarily far from balanced). For
weighted_coin_prob < 1 every step stays randomized (the coin is strictly
between 1 - weighted_coin_prob and weighted_coin_prob). The limit
weighted_coin_prob = 1 is allowed: it is deterministic whenever the counts are
unequal (the under-represented arm always gets the next subject), so the running
counts never differ by more than one and only the fair coin at a tie is random. This is a
count-balancing design only — it does not use covariates at all, in contrast to
DesignSeqOneByOneAtkinson/
DesignSeqOneByOneKK21, which bias the coin
toward covariate balance rather than (or in addition to) count balance.
References
Efron, B. (1971). "Forcing a sequential experiment to be balanced." Biometrika, 58(3), 403-417, doi:10.1093/biomet/58.3.403 . See also randomized experiment for orientation on biased-coin sequential designs.
Super classes
Design -> DesignSeqOneByOne -> DesignSeqOneByOneEfron
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$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()
DesignSeqOneByOneEfron$new()
Initialize an Efron (1971) biased coin sequential experimental
design (see class documentation for the exact assignment rule).
There is no prob_T argument: allocation is always 1:1
(prob_T = 0.5) because the biased coin always pushes the treated count toward the control count, a 1:1 target.
Usage
DesignSeqOneByOneEfron$new(
response_type,
include_is_missing_as_a_new_feature = TRUE,
n = NULL,
verbose = FALSE,
weighted_coin_prob = 2/3,
missingness_method = "impute",
design_formula = ~.,
seed = NULL
)Arguments
response_type"continuous", "incidence", "proportion", "count", "survival", or "ordinal".
include_is_missing_as_a_new_featureFlag for missingness indicators.
nThe sample size.
verboseA flag for verbosity.
weighted_coin_probThe probability of assigning the next subject to whichever of treatment/control currently has fewer subjects, when the running counts are unequal: a single number with \(0.5 < p \le 1\) (Efron's \(p > 1/2\)); other values error. \(p = 1\) is the deterministic limit (see class documentation). Default \(2/3\), the value from Efron (1971).
missingness_methodHow to handle missing values in covariates.
design_formulaA formula object.
seedInteger seed for reproducibility.
DesignSeqOneByOneEfron$assign_wt()
Draw the next subject's treatment assignment via Efron's
(1971) biased coin (see class documentation): a fair coin if the running
treated/control counts are equal, otherwise a coin biased toward the
currently under-represented group at probability weighted_coin_prob.
Examples
seq_des = DesignSeqOneByOneEfron$new(n = 6, response_type = 'continuous')
seq_des$add_one_subject_to_experiment_and_assign(data.frame(x1 = rnorm(1)))
#> [1] 0