Learn R Programming

brainGraph (version 1.0.0)

plot_boot: Plot global graph measures with shaded regions calculated from bootstrapping

Description

This function takes a list of boot objects (the number of elements equals the number of subject groups) and plots the observed value across all graph densities. It returns a list containing: a data.table with standard errors and 95% confidence intervals at each density, and 2 ggplot objects with shaded regions surrounding the observed values.

Usage

plot_boot(boot.dt, ylabel = NULL, alpha = 0.4, ...)

Arguments

boot.dt
A data.table output from boot_global
ylabel
A character string to place on the y-axis label (default: NULL)
alpha
A numeric indicating the opacity for geom_ribbon
...
Other parameters passed to geom_ribbon

Value

A list with the following elements:
p1
A ggplot object with ribbon representing standard error
p2
A ggplot object with ribbon representing 95% confidence interval

Details

The 95% confidence intervals are calculated using the normal approximation.

See Also

boot_global

Examples

Run this code
## Not run: ------------------------------------
# boot.mod <- boot_global(densities, resids.all, measure='mod')
# boot.mod.plots <- plot_boot(boot.mod$dt, ylab='Modularity')
## ---------------------------------------------

Run the code above in your browser using DataLab