Plotting GLM graphs {brainGraph} | R Documentation |
Plot a graph with results from GLM-based analyses
Description
These methods are convenience functions for plotting a graph based on results
from GLM-based analyses (i.e., brainGraph_GLM,
brainGraph_mediate, mtpc, NBS
). There are several
default arguments which differ depending on the input object.
Usage
## S3 method for class 'brainGraph_NBS'
plot(x, alpha = 0.05,
subgraph = paste("p.nbs >", 1 - alpha), vertex.label = NA,
vertex.color = "color.comp", edge.color = "color.comp",
subtitle = NULL, main = paste0("NBS: ", x$name), cex.main = 2, ...)
## S3 method for class 'brainGraph_GLM'
plot(x, p.sig = c("p", "p.fdr", "p.perm"),
subgraph = NULL, main = paste0(x$outcome, ": ", x$name),
subtitle = NULL, cex.main = 2, ...)
## S3 method for class 'brainGraph_mtpc'
plot(x, subgraph = "sig == 1",
main = paste0(x$outcome, ": ", x$name), subtitle = NULL,
cex.main = 2, ...)
## S3 method for class 'brainGraph_mediate'
plot(x, subgraph = "p.acme > 0.95",
main = sprintf("Effect of \"%s\" on\n\"%s\"\nmediated by \"%s\"",
x$treat, x$outcome, x$mediator), subtitle = NULL, cex.main = 1, ...)
Arguments
x |
A |
alpha |
Numeric; the significance level. Default: |
subgraph |
Character string specifying the condition for subsetting the graph. |
vertex.label |
Character vector of the vertex labels to be displayed. |
vertex.color |
Character string specifying the vertex attribute to color the vertices by. |
edge.color |
Character string specifying the edge attribute to color the edges by. |
subtitle |
Character string; the subtitle. Default: |
main |
Character string; the main title. Default: |
cex.main |
Numeric; the scaling factor for text size; see
|
... |
Other arguments passed to |
p.sig |
Character string indicating which p-value to use for determining
significance (default: |
Details
The default arguments are specified so that the user only needs to type
plot(x)
at the console, if desired. For all methods, the plot's
subtitle will be omitted.
NBS
By default, a subgraph will be plotted consisting of only those vertices which are part of a significant connected component. Vertex/edge colors will correspond to connected component membership. Vertex names will be omitted. Finally, the plot title will contain the contrast name.
brainGraph_GLM
By default, a subgraph will be plotted consisting of only those vertices for
which p < \alpha
. It will also include a plot title with the outcome
measure and contrast name.
mtpc
By default, a subgraph will be plotted consisting of only those vertices for
which A_{mtpc} > A_{crit}
. It will also include a plot title with the
outcome measure and contrast name.
brainGraph_mediate
By default, a subgraph will be plotted consisting of only those vertices for
which P_{acme} < \alpha
. It will also include a plot title with the
treatment, mediator, and outcome variable names.
See Also
Other Plotting functions: plot.brainGraphList
,
plot.brainGraph
,
plot_brainGraph_multi