plot.bg_GLM: Plot GLM diagnostics for a brain network

Description Usage Arguments Value Author(s) See Also Examples

View source: R/brainGraph_GLM.R

Description

Plots the GLM diagnostics (similar to that of plot.lm) for the output of brainGraph_GLM. There are a total of 6 possible plots, specified by the which argument; the behavior is the same as in plot.lm. Please see the help for that function.

Usage

1
2
## S3 method for class 'bg_GLM'
plot(x, region = NULL, which = c(1L:3L, 5L), ...)

Arguments

x

A bg_GLM object

region

Character string specifying which region's results to plot; only relevant if level='vertex' (default: NULL)

which

Integer vector indicating which of the 6 plots to print to the plot device (default: c(1:3, 5))

...

Unused

Value

A list of ggplot objects

Author(s)

Christopher G. Watson, [email protected]

See Also

plot.lm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
## Save objects and then to multipage PDF
lmPlots <- plot(x)
ggsave('lmPlots.pdf', lmPlots)

## Save all the GLM sub-objects from MTPC analysis
res.mtpc <- mtpc(...)
glmPlots <- lapply(res.mtpc$res.glm, plot, which=1:6)
ml <- marrangeGrob(glmPlots, nrow=1, ncol=1)
ggsave('glmPlots.pdf', ml, width=8.5, height=11)

## End(Not run)

brainGraph documentation built on May 29, 2018, 9:03 a.m.