Title: | Reverse Graphical Approaches |
---|---|
Description: | The graphical approach is proposed as a general framework for clinical trial designs involving multiple hypotheses, where decisions are made only based on the observed marginal p-values. A reverse graphical approach starts from a set of singleton graphs, and gradually add vertices into graphs until rejection of a set of hypotheses is made. See Gou, J. (2020). Reverse graphical approaches for multiple test procedures. Technical Report. |
Authors: | Jiangtao Gou [aut, cre], Fengqing Zhang [aut] |
Maintainer: | Jiangtao Gou <[email protected]> |
License: | GPL-3 |
Version: | 1.0.1 |
Built: | 2024-12-08 06:48:59 UTC |
Source: | CRAN |
Check the sufficient condition in RGA for the weak FWER control.
checkConditionW(w, G)
checkConditionW(w, G)
w |
a vector of initial weights |
G |
a matrix of initial transaction weights |
The conditions verified here are sufficient conditions. If a logical value TRUE
is returned, then the weak control of the FWER is guaranteed. The weak control of the FWER may still hold even if the output is FALSE
.
a logical value indicating whether the RGA's conditions are satisfied or not for the weak FWER control
Jiangtao Gou
Fengqing Zhang
w <- c(0.31, 0.33, 0.36) G <- matrix(c(0,0.4,0.6, 0.7,0,0.3, 0.5,0.5,0),nrow=3,byrow=TRUE) checkConditionW(w=w,G=G) w <- c(0.5,0.5,0) G <- matrix(c(0,1,0, 0.25,0,0.75, 1,0,0), nrow=3, byrow=TRUE) checkConditionW(w=w,G=G)
w <- c(0.31, 0.33, 0.36) G <- matrix(c(0,0.4,0.6, 0.7,0,0.3, 0.5,0.5,0),nrow=3,byrow=TRUE) checkConditionW(w=w,G=G) w <- c(0.5,0.5,0) G <- matrix(c(0,1,0, 0.25,0,0.75, 1,0,0), nrow=3, byrow=TRUE) checkConditionW(w=w,G=G)
Check the sufficient condition in RGA for the strong FWER control.
conditionCheck(w, G)
conditionCheck(w, G)
w |
a vector of initial weights |
G |
a matrix of initial transaction weights |
The conditions verified here are sufficient conditions. If a logical value TRUE
is returned, then the strong control of the FWER is guaranteed. The strong control of the FWER may still hold even if the output is FALSE
.
a logical value indicating whether the RGA's conditions are satisfied or not for the strong FWER control
Jiangtao Gou
w <- c(0.1,0.2,0.3,0.4) G <- matrix(c(0,0.3,0.3,0.4, 0.6,0,0.2,0.2, 0.5,0.2,0,0.3, 0.3,0.4,0.3,0),nrow=4,byrow=TRUE) conditionCheck(w=w,G=G)
w <- c(0.1,0.2,0.3,0.4) G <- matrix(c(0,0.3,0.3,0.4, 0.6,0,0.2,0.2, 0.5,0.2,0,0.3, 0.3,0.4,0.3,0),nrow=4,byrow=TRUE) conditionCheck(w=w,G=G)
Graphical approach for two hypotheses
ga2h(w, G, p, alpha)
ga2h(w, G, p, alpha)
w |
a vector of initial weights |
G |
a matrix of initial transaction weights |
p |
a vector of p-values |
alpha |
a number of significance level |
a logical vector indicating whether the hypothesis is rejected: TRUE = rejected, FALSE = accepted
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. <doi:10.1002/sim.3495>
w <- c(0.3,0.7) G <- matrix(c(0,1,1,0),nrow=2,byrow=TRUE) p <- c(0.032, 0.038) alpha <- 0.05 ga2h(w=w,G=G,p=p, alpha=alpha)
w <- c(0.3,0.7) G <- matrix(c(0,1,1,0),nrow=2,byrow=TRUE) p <- c(0.032, 0.038) alpha <- 0.05 ga2h(w=w,G=G,p=p, alpha=alpha)
Graphical approach for three hypotheses
ga3h(w, G, p, alpha)
ga3h(w, G, p, alpha)
w |
a vector of initial weights |
G |
a matrix of initial transaction weights |
p |
a vector of p-values |
alpha |
a number of significance level |
a logical vector indicating whether the hypothesis is rejected: TRUE = rejected, FALSE = accepted
Jiangtao Gou
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. <doi:10.1002/sim.3495>
w <- c(0.3,0.5,0.2) G <- matrix(c(0,1/3,2/3, 1/2,0,1/2, 1/5,4/5,0),nrow=3,byrow=TRUE) p <- c(0.012, 0.051, 0.021) p <- c(0.012, 0.051, 0.019) alpha <- 0.05 ga3h(w=w,G=G,p=p, alpha=alpha)
w <- c(0.3,0.5,0.2) G <- matrix(c(0,1/3,2/3, 1/2,0,1/2, 1/5,4/5,0),nrow=3,byrow=TRUE) p <- c(0.012, 0.051, 0.021) p <- c(0.012, 0.051, 0.019) alpha <- 0.05 ga3h(w=w,G=G,p=p, alpha=alpha)
Update the graph by removing a set of vertices
graphUpdate(w, G, vec01)
graphUpdate(w, G, vec01)
w |
a numeric vector of vertex weights |
G |
a matrix of transition weights |
vec01 |
a binary vector indicating the set of vertices planned to be removed: the vertex corresponding to the zeros in this vector will be removed |
a list of one updated vertex weight vector, one updated transition weight matrix, and a binory TRUE/FALSE indicater to show whether a node has been removed
Jiangtao Gou
w <- c(0.1,0.2,0.3,0.4) G <- matrix(c(0,0.3,0.3,0.4, 0.6,0,0.2,0.2, 0.5,0.2,0,0.3, 0.3,0.4,0.3,0),nrow=4,byrow=TRUE) vec01 <- c(1,0,0,1) graphUpdate(w=w,G=G,vec01=vec01)
w <- c(0.1,0.2,0.3,0.4) G <- matrix(c(0,0.3,0.3,0.4, 0.6,0,0.2,0.2, 0.5,0.2,0,0.3, 0.3,0.4,0.3,0),nrow=4,byrow=TRUE) vec01 <- c(1,0,0,1) graphUpdate(w=w,G=G,vec01=vec01)
Update the graph by removing one vertex
graphUpdateOne(w, G, vec01)
graphUpdateOne(w, G, vec01)
w |
a numeric vector of vertex weights |
G |
a matrix of transition weights |
vec01 |
a binary vector indicating the set of vertices planned to be removed: the vertex corresponding to the first zero in this vector will be removed |
a list of one updated vertex weight vector, one updated transition weight matrix, one updated indicator vector, and a binory TRUE/FALSE indicater to show whether a node has been removed
Jiangtao Gou
w <- c(0.1,0.2,0.3,0.4) G <- matrix(c(0,0.3,0.3,0.4, 0.6,0,0.2,0.2, 0.5,0.2,0,0.3, 0.3,0.4,0.3,0),nrow=4,byrow=TRUE) vec01 <- c(1,0,0,1) graphUpdateOne(w=w,G=G,vec01=vec01)
w <- c(0.1,0.2,0.3,0.4) G <- matrix(c(0,0.3,0.3,0.4, 0.6,0,0.2,0.2, 0.5,0.2,0,0.3, 0.3,0.4,0.3,0),nrow=4,byrow=TRUE) vec01 <- c(1,0,0,1) graphUpdateOne(w=w,G=G,vec01=vec01)
Generate a random graph from uniform distribution
randomGraph(n, seed = as.numeric(Sys.time()), wlim = c(0, 1), Glim = c(0, 1))
randomGraph(n, seed = as.numeric(Sys.time()), wlim = c(0, 1), Glim = c(0, 1))
n |
an integer: number of vertices |
seed |
an integer: a seed for random number generator |
wlim |
a vector of two numbers: range of vertex weights |
Glim |
a vector of two numbers: range of transition weights |
A list of one vector for vertex weights and one matrix for transition weights
Jiangtao Gou
Fengqing Zhang
wG <- randomGraph(n=5)
wG <- randomGraph(n=5)
reverse graphical approach for two hypotheses
rga2h(w, G, p, alpha)
rga2h(w, G, p, alpha)
w |
a vector of initial weights |
G |
a matrix of initial transaction weights |
p |
a vector of p-values |
alpha |
a number of significance level |
a logical vector indicating whether the hypothesis is rejected: TRUE = rejected, FALSE = accepted
Jiangtao Gou
Gou, J. (2020). Reverse graphical approaches for multiple test procedures. Technical Report.
w <- c(0.3,0.7) G <- matrix(c(0,1,1,0),nrow=2,byrow=TRUE) p <- c(0.032, 0.038) alpha <- 0.05 rga2h(w=w,G=G,p=p, alpha=alpha)
w <- c(0.3,0.7) G <- matrix(c(0,1,1,0),nrow=2,byrow=TRUE) p <- c(0.032, 0.038) alpha <- 0.05 rga2h(w=w,G=G,p=p, alpha=alpha)
Power Analysis for Graphical Approaches and Reverse Graphical Approaches with Two Hypotheses
rga2pwr(w, G, alpha, delta, corr, method = "rga")
rga2pwr(w, G, alpha, delta, corr, method = "rga")
w |
a vector of initial weights |
G |
a matrix of initial transaction weights |
alpha |
a number of significance level |
delta |
a vector of effect sizes |
corr |
a correlation matrix |
method |
a string specified the method: "rga" for Reverse Graphical Approaches and "ga" for Graphical Approaches |
a numerical matrix including the probabilities of four combinations of being rejected and being accepted for two hypotheses. Row indices stand for the first hypothesis, and column indices stand for the second hypothesis. The first index stands for the probability of acceptance, and the second index stands for the probability of rejection.
Jiangtao Gou
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. <doi:10.1002/sim.3495>
Gou, J. (2020). Reverse graphical approaches for multiple test procedures. Technical Report.
w <- c(0.3,0.7) G <- matrix(c(0,1,1,0),nrow=2,byrow=TRUE) alpha <- 0.05 delta <- c(0,2) rho <- 0.0 corr <- matrix(c(1,rho,rho,1), nrow=2) method="rga" rga2pwr(w=w, G=G, alpha=alpha, delta=delta, corr=corr, method=method)
w <- c(0.3,0.7) G <- matrix(c(0,1,1,0),nrow=2,byrow=TRUE) alpha <- 0.05 delta <- c(0,2) rho <- 0.0 corr <- matrix(c(1,rho,rho,1), nrow=2) method="rga" rga2pwr(w=w, G=G, alpha=alpha, delta=delta, corr=corr, method=method)
reverse graphical approach for three hypotheses
rga3h(w, G, p, alpha)
rga3h(w, G, p, alpha)
w |
a vector of initial weights |
G |
a matrix of initial transaction weights |
p |
a vector of p-values |
alpha |
a number of significance level |
a logical vector indicating whether the hypothesis is rejected: TRUE = rejected, FALSE = accepted
Jiangtao Gou
Gou, J. (2020). Reverse graphical approaches for multiple test procedures. Technical Report.
w <- c(0.3,0.5,0.2) G <- matrix(c(0,1/3,2/3, 1/2,0,1/2, 1/5,4/5,0),nrow=3,byrow=TRUE) p <- c(0.012, 0.051, 0.021) p <- c(0.012, 0.051, 0.019) alpha <- 0.05 rga3h(w=w,G=G,p=p, alpha=alpha)
w <- c(0.3,0.5,0.2) G <- matrix(c(0,1/3,2/3, 1/2,0,1/2, 1/5,4/5,0),nrow=3,byrow=TRUE) p <- c(0.012, 0.051, 0.021) p <- c(0.012, 0.051, 0.019) alpha <- 0.05 rga3h(w=w,G=G,p=p, alpha=alpha)