Skip to contents

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

Usage

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"
 }
)

Arguments

nHypotheses

number of hypotheses in graph

nameHypotheses

hypothesis names

alphaHypotheses

alpha-levels or weights for ellipses

m

square transition matrix of dimension `nHypotheses`

fill

grouping variable for hypotheses

palette

colors for groups

labels

text labels for groups

legend.name

text for legend header

legend.position

text string or x,y coordinates for legend

halfWid

half width of ellipses

halfHgt

half height of ellipses

trhw

transition box width

trhh

transition box height

trprop

proportion of transition arrow length where transition box is placed

digits

number of digits to show for alphaHypotheses

trdigits

digits displayed for transition weights

size

text size in ellipses

boxtextsize

transition text size

arrowsize

size of arrowhead for transition arrows

radianStart

radians from origin for first ellipse; nodes spaced equally in clockwise order with centers on an ellipse by default

offset

rotational offset in radians for transition weight arrows

xradius

horizontal ellipse diameter on which ellipses are drawn

yradius

vertical ellipse diameter on which ellipses are drawn

x

x coordinates for hypothesis ellipses if elliptical arrangement is not wanted

y

y coordinates for hypothesis ellipses if elliptical arrangement is not wanted

wchar

character for alphaHypotheses in ellipses

Value

A `ggplot` object with a multi-layer multiplicity graph

Details

See vignette **Multiplicity graphs formatting using ggplot2** for explanation of formatting.

Examples

# 'gsDesign::hGraph' is deprecated.
# See the examples in 'gMCPLite::hGraph' instead.