MAD
self, bandit, alpha, delta, t_star, model=None, n_warmup=1, pooled=True) MAD(
A class implementing the Mixture-Adaptive Design (MAD; Liang and Bojinov, 2024) both with or without covariate adjustment (MADCovar; Molitor and Gold, 2025).
Parameters
Name | Type | Description | Default |
---|---|---|---|
bandit | pyssed.Bandit | This object must implement several crucial methods/attributes. For more details on how to create a custom Bandit object, see the documentation of the Bandit class. | required |
alpha | float | The size of the statistical test (testing for non-zero treatment effects) | required |
delta | Callable[[int], float] | A function that generates the real-valued sequence delta_t in Liang and Bojinov (Definition 4 - Mixture Adaptive Design). This sequence should converge to 0 slower than 1/t^(1/4) where t denotes the time frame in {0, … n}. This function should intake an integer (t) and output a float (the corresponding delta_t) | required |
t_star | int | The time-step at which we want to optimize the CSs to be tightest. E.g. Liang and Bojinov set this to the max horizon of their experiment. | required |
model | Model | (Optional) The model class used to estimated the outcome models. This is only relevant when using covariate adjustment. Please see pyssed.model.Model for more details. | None |
n_warmup | int | The number of units (t) to collect before constructing CSs and estimating the outcome models. This is only relevant when using covariate adjustment. | 1 |
pooled | bool | Whether the outcome models should be estimated separately for each treatment arm or if a single, pooled model should be estimated. This is only relevant when using covariate adjustment. | True |
Notes
See the documentation for pyssed.mad.MADBase
for details on the majority of the provided methods.
Methods
Name | Description |
---|---|
pull | Perform one full iteration of the MAD algorithm. |
pull
=True, cs_precision=0.1, mc_adjust='Bonferroni') MAD.pull(early_stopping
Perform one full iteration of the MAD algorithm.
Parameters
Name | Type | Description | Default |
---|---|---|---|
early_stopping | bool | Whether or not to stop the experiment early when all the arms have statistically significant ATEs. | True |
cs_precision | float | This parameter controls how precise we want to make our Confidence Sequences (CSs). If cs_precision = 0 then the experiment will stop immediately as soon as all arms are statistically significant. If cs_precision = 0.2 then the experiment will run until all CSs are at least 20% tighter (shorter) than they were when they became statistically significant. If cs_precision = 0.4 the experiment will run until all CSs are at least 40% tighter, and so on. |
0.1 |
mc_adjust | str | The type of multiple comparison correction to apply to the constructed CSs. Default is “Bonferroni” (currently “Bonferroni” or None are the only supported options). | 'Bonferroni' |