Implements the graphical test procedure described in Bretz et al. (2009). Note that the gMCP function in the gMCP package performs the same task.
Usage
graphTest(
pvalues,
weights = NULL,
alpha = 0.05,
G = NULL,
cr = NULL,
graph = NULL,
verbose = FALSE,
test,
upscale = FALSE
)
Arguments
- pvalues
Either a vector or a matrix containing the local p-values for the hypotheses in the rows.
- weights
Initial weight levels for the test procedure, in case of multiple graphs this needs to be a matrix.
- alpha
Overall alpha level of the procedure. For entangled graphs
alpha
should be a numeric vector of length equal to the number of graphs, each element specifying the partial alpha for the respective graph. The overall alpha level equalssum(alpha)
.- G
For simple graphs
G
should be a numeric matrix determining the graph underlying the test procedure. Note that the diagonal need to contain only 0s, while the rows need to sum to 1. For entangled graphs it needs to be a list containing the different graph matrices as elements.- cr
Correlation matrix that should be used for the parametric test. If
cr==NULL
the Bonferroni based test procedure is used.- graph
As an alternative to the specification via
weights
andG
one can also hand over agraphMCP
object to the code.graphMCP
objects can be created for example with thegraphGUI
function.- verbose
If verbose is TRUE, additional information about the graphical rejection procedure is displayed.
- test
In the parametric case there is more than one way to handle subgraphs with less than the full alpha. If the parameter
test
is missing, the tests are performed as described by Bretz et al. (2011), i.e. tests of intersection null hypotheses always exhaust the full alpha level even if the sum of weights is strictly smaller than one. Iftest="simple-parametric"
the tests are performed as defined in Equation (3) of Bretz et al. (2011).- upscale
Logical. If
upscale=FALSE
then for each intersection of hypotheses (i.e. each subgraph) a weighted test is performed at the possibly reduced level alpha of sum(w)*alpha, where sum(w) is the sum of all node weights in this subset. Ifupscale=TRUE
all weights are upscaled, so that sum(w)=1.
Value
A vector or a matrix containing the test results for the hypotheses under consideration. Significant tests are denoted by a 1, non-significant results by a 0.
References
Bretz, F., Maurer, W., Brannath, W. and Posch, M. (2009) A graphical approach to sequentially rejective multiple test procedures. Statistics in Medicine, 28, 586--604
Bretz, F., Maurer, W. and Hommel, G. (2010) Test and power considerations for multiple endpoint analyses using sequentially rejective graphical procedures, to appear in Statistics in Medicine