View source: R/adaptive_two_stage.R
| fPCStagewise | R Documentation |
Compute local p-values for the intersection hypotheses in a two-stage adaptive multiple testing procedure using a p-value combination method.
fPCStagewise(
stg2_p,
wgtmat = NULL,
family = NULL,
corr = NULL,
stg1_inthyp_nr,
stg2_elemhyp,
stg2_wgtmat = NULL,
test = "dunnett",
nthreads = 0
)
stg2_p |
Stage 2 p-values for the elementary hypotheses. |
wgtmat |
Weight matrix for the stage 1 intersection hypotheses. If
|
family |
Family matrix indicating which hypotheses belong to which families. The correlation is known only for hypotheses belonging to the same family. Defaults to one family containing all elementary hypotheses. |
corr |
Correlation matrix for the test statistics. If |
stg1_inthyp_nr |
Indices of the stage 1 intersection hypotheses that were not rejected. |
stg2_elemhyp |
Indices of the elementary hypotheses tested at stage 2. |
stg2_wgtmat |
Weight matrix for the stage 2 intersection hypotheses.
If |
test |
P-value combination method. It can start with |
nthreads |
The number of threads to use in simulations (0 means the default RcppParallel behavior). |
Despite the stage-oriented parameter names, this function can also be used
to generate stage 1 local p-values. In that case, provide the complete set
of intersection hypotheses in stg1_inthyp_nr, all elementary
hypotheses in stg2_elemhyp, and the corresponding stage 1 p-values
and weight matrix. The example illustrates this use.
A list containing:
inthyp_idx: The 1-based indices of the stage 1 intersection
hypotheses represented in the output.
inthyp: Their intersection-hypothesis indicator matrix.
pinter: Their local p-values.
Kaifeng Lu, kaifenglu@gmail.com
Cyrus Mehta, Ajoy Mukhopadhyay, and Martin Posch. Graph Based, Adaptive, Multiarm, Multiple Endpoint, Two-Stage Designs. Statistics in Medicine. 2025.
initial_weights <- c(0.5, 0.5, 0, 0)
transition_matrix <- matrix(c(0, 0.5, 0.5, 0,
0.5, 0, 0, 0.5,
0, 1, 0, 0,
1, 0, 0, 0),
nrow = 4, byrow = TRUE)
wgtmat <- fwgtmat(initial_weights, transition_matrix)
family <- matrix(c(1, 1, 0, 0,
0, 0, 1, 1),
nrow = 2, byrow = TRUE)
corr <- matrix(c(1, 0.5, NA, NA,
0.5, 1, NA, NA,
NA, NA, 1, 0.5,
NA, NA, 0.5, 1),
nrow = 4, byrow = TRUE)
fPCStagewise(stg2_p = c(0.00045, 0.0952, 0.0225, 0.1104),
wgtmat = wgtmat, family = family, corr = corr,
stg1_inthyp_nr = 1:15, stg2_elemhyp = 1:4,
stg2_wgtmat = wgtmat, test = "dunnett",
nthreads = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.