Learn R Programming

brainGraph (version 2.0.2)

plot.brainGraph_resids: Plot model residuals for each brain region

Description

Check the model residuals for each brain region in a structural covariance analysis. It shows a qqplot of the studentized residuals, as output from get.resid.

Usage

# S3 method for brainGraph_resids
plot(x, regions = NULL, cols = FALSE, ...)

Arguments

x

A brainGraph_resids object (from get.resid)

regions

Character vector of region(s) to focus on; default behavior is to show summary for all regions

cols

Logical indicating whether to color by group (default: FALSE)

...

Unused

Value

A list of ggplot objects

See Also

qqnorm

Other Structural covariance network functions: IndividualContributions, brainGraph_boot, brainGraph_init, brainGraph_permute, corr.matrix, get.resid, plot_volumetric

Examples

Run this code
# NOT RUN {
## First get the resid's and store the plots as an object
myresids <- get.resids(lhrh, covars)
p.resids <- plot(myresids, cols=TRUE)

## Open a new plot device for each set of 9
lapply(p.resids, function(x) {dev.new(); print(x)})

## Save as a multi-page PDF; requires \code{gridExtra}
ml <- marrangeGrob(p.resids, nrow=1, ncol=1)
ggsave('residuals.pdf', ml)
# }

Run the code above in your browser using DataLab