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 brainGraph_GLM, brainGraph_mtpc, brainGraph_mediate, or brainGraph_NBS object

alpha

Numeric; the significance level. Default: 0.05

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: 'default'

main

Character string; the main title. Default: NULL

cex.main

Numeric; the scaling factor for text size; see par

...

Other arguments passed to plot.brainGraph

p.sig

Character string indicating which p-value to use for determining significance (default: p)

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


[Package brainGraph version 3.1.0 Index]