Skip to contents

This adapts a multiarm design by dropping a treatment arm and adjusting the number of datapoints

Usage

multiarm_drop_arms(
  design,
  arms,
  n_cont_2 = NA,
  n_treat_2 = NA,
  alt_adj = FALSE,
  adapt_bounds = TRUE
)

Arguments

design

multiarm_design object

arms

list of with integers specifing which arms should be dropped

n_cont_2, n_treat_2

list of number of datapoints for the control and treatment groups Can be different for different groups. The lenght should be equal to the number of control/treatment groups, including dropped treatments, which will always be set to 0

alt_adj

uses cer_alt_drop_hypotheses() for dropping the hypotheses instead of cer_drop_hypotheses()

adapt_bounds

Adapt the bounds for rejecting a hypotheses to keep the FWER with the new adaptions, see cer_adapt()

Details

The weights of the dropped hypotheses are set to 0 and distributed according to the prespecified graph, similarly to cer_drop_hypotheses() If specified, the time fraction of the interim test will also be adapted according to the number of data points in the second stage, assuming the first stage n was as planned accoring to t.

Examples

as <- function(x,t) 2-2*pnorm(qnorm(1-x/2)/sqrt(t))
design <- multiarm_cer_design(
 controls = 1,
 treatment_assoc = c(1,1),
 n_controls = 50,
 n_treatments = 50,
 weights = c(0.5, 0.5),
 alpha = 0.05,
 test_m = rbind(c(0, 1),
              c(1, 0)),
 alpha_spending_f = as,
 t = 0.5)

design <- cer_interim_test(design, c(0.1, 0.02))

design <- design |> multiarm_drop_arms(1)
design
#> A Multi-arm Design object, for testing 2 hypotheses at FWER 0.05.
#> 
#> There are 1 control groups for a total of 2 hypotheses.
#> 
#> ── An interim test has been performed. ─────────────────────────────────────────
#> No Hypotheses were rejected at the interim.
#> ── The following characteristics have been adapted: ────────────────────────────
#>  Hypotheses weights
#>  Graph Transition Matrix
#>  Correlation for parametric test
#> ── No final test has been performed yet ────────────────────────────────────────