gMCP: Graph based Multiple Comparison Procedures

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Performs a graph based multiple test procedure for a given graph and unadjusted p-values.

Usage

1
2
3
4
gMCP(graph, pvalues, test, correlation, alpha = 0.05, approxEps = TRUE,
  eps = 10^(-3), ..., upscale = ifelse(missing(test) &&
  !missing(correlation) || !missing(test) && test == "Bretz2011", TRUE, FALSE),
  useC = FALSE, verbose = FALSE, keepWeights = TRUE, adjPValues = TRUE)

Arguments

graph

A graph of class graphMCP.

pvalues

A numeric vector specifying the p-values for the graph based MCP. Note the assumptions in the details section for the parametric tests, when a correlation is specified.

test

Should be either "Bonferroni", "Simes" or "parametric". If not specified by default the Bonferroni-based test procedure is used if no correlation is specified or the algorithm from Bretz et al. 2011 if a correlation is specified. If test is set to "Simes" the weighted Simes test will be performed for each subset of hypotheses.

correlation

Optional correlation matrix. If the weighted Simes test is performed, it is checked whether type I error rate can be ensured and a warning is given if this is not the case. For parametric tests the p-values must arise from one-sided tests with multivariate normal distributed test statistics for which the correlation is (partially) known. In that case a weighted parametric closed test is performed (also see generatePvals). Unknown values can be set to NA. (See details for more information)

alpha

A numeric specifying the maximal allowed type one error rate.

approxEps

A boolean specifying whether epsilon values should be substituted with the value given in the parameter eps.

eps

A numeric scalar specifying a value for epsilon edges.

...

Test specific arguments can be given here.

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. If upscale=TRUE all weights are upscaled, so that sum(w)=1.

useC

Logical scalar. If TRUE neither adjusted p-values nor intermediate graphs are returned, but the calculation is sped up by using code written in C. THIS CODE IS NOT FOR PRODUCTIVE USE YET! If approxEps is FALSE and the graph contains epsilon edges, a warning is thrown and useC will be ignored.

verbose

Logical scalar. If TRUE verbose output is generated during sequentially rejection steps.

keepWeights

Logical scalar. If FALSE the weight of a node without outgoing edges is set to 0 if it is removed. Otherwise it keeps its weight.

adjPValues

Logical scalar. If FALSE no adjusted p-values will be calculated. Especially for the weighted Simes test this will result in significantly less calculations in most cases.

Details

For the Bonferroni procedure the p-values can arise from any statistical test, but if you improve the test by specifying a correlation matrix, the following assumptions apply:

It is assumed that under the global null hypothesis (Φ^{-1}(1-p_1),...,Φ^{-1}(1-p_m)) follow a multivariate normal distribution with correlation matrix correlation where Φ^{-1} denotes the inverse of the standard normal distribution function.

For example, this is the case if p_1,..., p_m are the raw p-values from one-sided z-tests for each of the elementary hypotheses where the correlation between z-test statistics is generated by an overlap in the observations (e.g. comparison with a common control, group-sequential analyses etc.). An application of the transformation Φ^{-1}(1-p_i) to raw p-values from a two-sided test will not in general lead to a multivariate normal distribution. Partial knowledge of the correlation matrix is supported. The correlation matrix has to be passed as a numeric matrix with elements of the form: correlation[i,i] = 1 for diagonal elements, correlation[i,j] = ρ_{ij}, where ρ_{ij} is the known value of the correlation between Φ^{-1}(1-p_i) and Φ^{-1}(1-p_j) or NA if the corresponding correlation is unknown. For example correlation[1,2]=0 indicates that the first and second test statistic are uncorrelated, whereas correlation[2,3] = NA means that the true correlation between statistics two and three is unknown and may take values between -1 and 1. The correlation has to be specified for complete blocks (ie.: if cor(i,j), and cor(i,j') for i!=j!=j' are specified then cor(j,j') has to be specified as well) otherwise the corresponding intersection null hypotheses tests are not uniquely defined and an error is returned.

For further details see the given references.

Value

An object of class gMCPResult, more specifically a list with elements

graphs

list of graphs

pvalues

p-values

rejected

logical whether hyptheses could be rejected

adjPValues

adjusted p-values

Author(s)

Kornelius Rohmeyer rohmeyer@small-projects.de

References

Frank Bretz, Willi Maurer, Werner Brannath, Martin Posch: A graphical approach to sequentially rejective multiple test procedures. Statistics in Medicine 2009 vol. 28 issue 4 page 586-604. http://www.meduniwien.ac.at/fwf_adaptive/papers/bretz_2009_22.pdf

Bretz F., Posch M., Glimm E., Klinglmueller F., Maurer W., Rohmeyer K. (2011): Graphical approaches for multiple endpoint problems using weighted Bonferroni, Simes or parametric tests - to appear.

Strassburger K., Bretz F.: Compatible simultaneous lower confidence bounds for the Holm procedure and other Bonferroni based closed tests. Statistics in Medicine 2008; 27:4914-4927.

Hommel G., Bretz F., Maurer W.: Powerful short-cuts for multiple testing procedures with special reference to gatekeeping strategies. Statistics in Medicine 2007; 26:4063-4073.

Guilbaud O.: Simultaneous confidence regions corresponding to Holm's stepdown procedure and other closed-testing procedures. Biometrical Journal 2008; 50:678-692.

See Also

graphMCP graphNEL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
g <- BonferroniHolm(5)
gMCP(g, pvalues=c(0.01, 0.02, 0.04, 0.04, 0.7))
# Simple Bonferroni with empty graph:
g2 <- matrix2graph(matrix(0, nrow=5, ncol=5))
gMCP(g2, pvalues=c(0.01, 0.02, 0.04, 0.04, 0.7))
# With 'upscale=TRUE' equal to BonferroniHolm:
gMCP(g2, pvalues=c(0.01, 0.02, 0.04, 0.04, 0.7), upscale=TRUE)

# Entangled graphs:
g3 <- Entangled2Maurer2012()
gMCP(g3, pvalues=c(0.01, 0.02, 0.04, 0.04, 0.7), correlation=diag(5))

Example output

OpenJDK 64-Bit Server VM warning: Can't detect primordial thread stack location - find_vma failed
gMCP-Result

Initial graph:
A graphMCP graph
H1 (weight=0.2)
H2 (weight=0.2)
H3 (weight=0.2)
H4 (weight=0.2)
H5 (weight=0.2)
Edges:
H1  -( 0.25 )->  H2 
H1  -( 0.25 )->  H3 
H1  -( 0.25 )->  H4 
H1  -( 0.25 )->  H5 
H2  -( 0.25 )->  H1 
H2  -( 0.25 )->  H3 
H2  -( 0.25 )->  H4 
H2  -( 0.25 )->  H5 
H3  -( 0.25 )->  H1 
H3  -( 0.25 )->  H2 
H3  -( 0.25 )->  H4 
H3  -( 0.25 )->  H5 
H4  -( 0.25 )->  H1 
H4  -( 0.25 )->  H2 
H4  -( 0.25 )->  H3 
H4  -( 0.25 )->  H5 
H5  -( 0.25 )->  H1 
H5  -( 0.25 )->  H2 
H5  -( 0.25 )->  H3 
H5  -( 0.25 )->  H4 


P-values:
  H1   H2   H3   H4   H5 
0.01 0.02 0.04 0.04 0.70 

Adjusted p-values:
  H1   H2   H3   H4   H5 
0.05 0.08 0.12 0.12 0.70 

Alpha: 0.05 

Hypothesis rejected:
   H1    H2    H3    H4    H5 
 TRUE FALSE FALSE FALSE FALSE 

Final graph after 1 steps:
A graphMCP graph
H1 (rejected, weight=0)
H2 (weight=0.25)
H3 (weight=0.25)
H4 (weight=0.25)
H5 (weight=0.25)
Edges:
H2  -( 0.333333333333333 )->  H3 
H2  -( 0.333333333333333 )->  H4 
H2  -( 0.333333333333333 )->  H5 
H3  -( 0.333333333333333 )->  H2 
H3  -( 0.333333333333333 )->  H4 
H3  -( 0.333333333333333 )->  H5 
H4  -( 0.333333333333333 )->  H2 
H4  -( 0.333333333333333 )->  H3 
H4  -( 0.333333333333333 )->  H5 
H5  -( 0.333333333333333 )->  H2 
H5  -( 0.333333333333333 )->  H3 
H5  -( 0.333333333333333 )->  H4 

gMCP-Result

Initial graph:
A graphMCP graph
H1 (weight=0.2)
H2 (weight=0.2)
H3 (weight=0.2)
H4 (weight=0.2)
H5 (weight=0.2)
No edges.


P-values:
  H1   H2   H3   H4   H5 
0.01 0.02 0.04 0.04 0.70 

Adjusted p-values:
  H1   H2   H3   H4   H5 
0.05 0.10 0.20 0.20 1.00 

Alpha: 0.05 

Hypothesis rejected:
   H1    H2    H3    H4    H5 
 TRUE FALSE FALSE FALSE FALSE 

Final graph after 1 steps:
A graphMCP graph
Sum of weight: 0.8
H1 (rejected, weight=0)
H2 (weight=0.2)
H3 (weight=0.2)
H4 (weight=0.2)
H5 (weight=0.2)
No edges.

gMCP-Result

Initial graph:
A graphMCP graph
H1 (weight=0.2)
H2 (weight=0.2)
H3 (weight=0.2)
H4 (weight=0.2)
H5 (weight=0.2)
No edges.


P-values:
  H1   H2   H3   H4   H5 
0.01 0.02 0.04 0.04 0.70 

Adjusted p-values:
  H1   H2   H3   H4   H5 
0.05 0.08 0.12 0.12 0.70 

Alpha: 0.05 

Hypothesis rejected:
   H1    H2    H3    H4    H5 
 TRUE FALSE FALSE FALSE FALSE 

Final graph after 1 steps:
A graphMCP graph
H1 (rejected, weight=0)
H2 (weight=0.25)
H3 (weight=0.25)
H4 (weight=0.25)
H5 (weight=0.25)
No edges.

gMCP-Result

Initial graph:
An object of class "entangledMCP"
Slot "subgraphs":
[[1]]
A graphMCP graph
H1 (weight=1)
H2 (weight=0)
H3 (weight=0)
H4 (weight=0)
H5 (weight=0)
Edges:
H1  -( 1 )->  H3 
H2  -( 1 )->  H5 
H3  -( 1 )->  H4 
H4  -( 1 )->  H2 


[[2]]
A graphMCP graph
H1 (weight=0)
H2 (weight=1)
H3 (weight=0)
H4 (weight=0)
H5 (weight=0)
Edges:
H1  -( 1 )->  H4 
H2  -( 1 )->  H3 
H3  -( 1 )->  H5 
H5  -( 1 )->  H1 



Slot "weights":
[1] 0.5 0.5

Slot "graphAttr":
list()


P-values:
  H1   H2   H3   H4   H5 
0.01 0.02 0.04 0.04 0.70 

Adjusted p-values:
    H1     H2     H3     H4     H5 
0.0199 0.0396 0.0400 0.0784 0.7000 

Alpha: 0.05 

Hypothesis rejected:
   H1    H2    H3    H4    H5 
 TRUE  TRUE  TRUE FALSE FALSE 

gMCP documentation built on May 2, 2019, 6:07 p.m.