Adapt a cer design by dropping hypotheses, with a simplified strategy for redistributing weights
cer_alt_drop_hypotheses.Rd
The weights of the dropped hypotheses are set to 0 and distributed proportionally to the previous weight to the other hypotheses. This means the weights "stay the same", they are only adapted to still sum up to 1. Note that this method does not lead to an adapted graph that is coherent with the actual weight distribution, this may lead to problems down the line
Arguments
- design
cer_design object
- hypotheses
vector of booleans indicating for each hypotheses if it should be dropped
- adapt_bounds
Adapt the bounds for rejecting a hypotheses to keep the FWER with the new adaptions, see
cer_adapt()
Examples
as <- function(x,t) 2-2*pnorm(qnorm(1-x/2)/sqrt(t))
design <- cer_design(
correlation=rbind(H1=c(1, NA),
H2=c(NA, 1)),
weights=c(2/3, 1/3),
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 <- cer_alt_drop_hypotheses(design, c(TRUE, FALSE))
design
#> A CER Design object, for testing 2 hypotheses at FWER 0.05.
#>
#> ── Inital design specification ─────────────────────────────────────────────────
#>
#> Hypotheses weights
#> [1] 0.6666667 0.3333333
#>
#> Graph Transition Matrix
#> [,1] [,2]
#> [1,] 0 1
#> [2,] 1 0
#>
#> Correlation for parametric test
#> [,1] [,2]
#> H1 1 NA
#> H2 NA 1
#>
#> Interim test is planned at time fraction 0.5
#>
#> ── Interim test result ─────────────────────────────────────────────────────────
#>
#> P-values of interim test are:
#> [1] 0.10 0.02
#> No Hypotheses were rejected at the interim
#>
#> ── Adaptions from inital specification ─────────────────────────────────────────
#>
#> New hypotheses weights
#> [1] 0 1
#>