graphMCP-class {gMCP} | R Documentation |
Class graphMCP
Description
A graphMCP object describes a sequentially rejective multiple test procedure.
Slots
m
:A transition matrix. Can be either
numerical
orcharacter
depending whether the matrix contains variables or not. Row and column names will be the names of the nodes.weights
:A numeric.
edgeAttr
:A list for edge attributes.
nodeAttr
:A list for node attributes.
Methods
- getMatrix
signature(object = "graphMCP")
: A method for getting the transition matrix of the graph.- getWeights
signature(object = "graphMCP")
: A method for getting the weights. If a third optional argumentnode
is specified, only for these nodes the weight will be returned.- setWeights
signature(object = "graphMCP")
: A method for setting the weights. If a third optional argumentnode
is specified, only for these nodes the weight will be set.- getRejected
signature(object = "graphMCP")
: A method for getting the information whether the hypotheses are marked in the graph as already rejected. If a second optional argumentnode
is specified, only for these nodes the boolean vector will be returned.- getXCoordinates
signature(object = "graphMCP")
: A method for getting the x coordinates of the graph. If a second optional argumentnode
is specified, only for these nodes the x coordinates will be returned. If x coordinates are not set yetNULL
is returned.- getYCoordinates
signature(object = "graphMCP")
: A method for getting the y coordinates of the graph If a second optional argumentnode
is specified, only for these nodes the x coordinates will be returned. If y coordinates are not set yetNULL
is returned.- setEdge
signature(from="character", to="character", graph="graphNEL", weights="numeric")
: A method for adding new edges with the given weights.- setEdge
signature(from="character", to="character", graph="graphMCP", weights="character")
: A method for adding new edges with the given weights.
Author(s)
Kornelius Rohmeyer rohmeyer@small-projects.de
Examples
m <- rbind(H11=c(0, 0.5, 0, 0.5, 0, 0 ),
H21=c(1/3, 0, 1/3, 0, 1/3, 0 ),
H31=c(0, 0.5, 0, 0, 0, 0.5),
H12=c(0, 1, 0, 0, 0, 0 ),
H22=c(0.5, 0, 0.5, 0, 0, 0 ),
H32=c(0, 1, 0, 0, 0, 0 ))
weights <- c(1/3, 1/3, 1/3, 0, 0, 0)
# Graph creation
graph <- new("graphMCP", m=m, weights=weights)
# Visualization settings
nodeX <- rep(c(100, 300, 500), 2)
nodeY <- rep(c(100, 300), each=3)
graph@nodeAttr$X <- nodeX
graph@nodeAttr$Y <- nodeY
getWeights(graph)
getRejected(graph)
pvalues <- c(0.1, 0.008, 0.005, 0.15, 0.04, 0.006)
result <- gMCP(graph, pvalues)
getWeights(result@graphs[[4]])
getRejected(result@graphs[[4]])