hGraph()
plots a multiplicity graph defined by user inputs.
The graph can also be used with the **gMCPLite** package to evaluate a set of nominal p-values for the tests of the hypotheses in the graph
hGraph(
nHypotheses = 4,
nameHypotheses = paste("H", (1:nHypotheses), sep = ""),
alphaHypotheses = 0.025/nHypotheses,
m = matrix(array(1/(nHypotheses - 1), nHypotheses^2), nrow = nHypotheses) -
diag(1/(nHypotheses - 1), nHypotheses),
fill = 1,
palette = grDevices::gray.colors(length(unique(fill)), start = 0.5, end = 0.8),
labels = LETTERS[1:length(unique(fill))],
legend.name = " ",
legend.position = "none",
halfWid = 0.5,
halfHgt = 0.5,
trhw = 0.1,
trhh = 0.075,
trprop = 1/3,
digits = 5,
trdigits = 2,
size = 6,
boxtextsize = 4,
arrowsize = 0.02,
radianStart = if ((nHypotheses)%%2 != 0) {
pi * (1/2 + 1/nHypotheses)
} else { pi * (1 + 2/nHypotheses)/2
},
offset = pi/4/nHypotheses,
xradius = 2,
yradius = xradius,
x = NULL,
y = NULL,
wchar = if (as.character(Sys.info()[1]) == "Windows") {
"w"
} else {
"w"
}
)
A `ggplot` object with a multi-layer multiplicity graph
number of hypotheses in graph
hypothesis names
alpha-levels or weights for ellipses
square transition matrix of dimension `nHypotheses`
grouping variable for hypotheses
colors for groups
text labels for groups
text for legend header
text string or x,y coordinates for legend
half width of ellipses
half height of ellipses
transition box width
transition box height
proportion of transition arrow length where transition box is placed
number of digits to show for alphaHypotheses
digits displayed for transition weights
text size in ellipses
transition text size
size of arrowhead for transition arrows
radians from origin for first ellipse; nodes spaced equally in clockwise order with centers on an ellipse by default
rotational offset in radians for transition weight arrows
horizontal ellipse diameter on which ellipses are drawn
vertical ellipse diameter on which ellipses are drawn
x coordinates for hypothesis ellipses if elliptical arrangement is not wanted
y coordinates for hypothesis ellipses if elliptical arrangement is not wanted
character for alphaHypotheses in ellipses
See vignette **Multiplicity graphs formatting using ggplot2** for explanation of formatting.
# 'gsDesign::hGraph' is deprecated.
# See the examples in 'gMCPLite::hGraph' instead.
Run the code above in your browser using DataLab