Learn R Programming

brainGraph (version 2.2.0)

analysis_random_graphs: Perform an analysis with random graphs for brain MRI data

Description

This function is not quite a "proper" function. It performs the steps needed for doing typical graph theory analyses with brain MRI data if you need to generate equivalent random graphs. This includes calculating small world parameters and normalized rich club coefficients.

Usage

analysis_random_graphs(g.list, N = 100, savedir = ".", ...)

Arguments

g.list

List of lists containing igraph graph objects

N

Integer specifying number of random graphs to generate per individual graph (default: 100)

savedir

Character string specifying the directory in which to save the generated graphs (default: current working directory)

...

Other arguments passed to sim.rand.graph.par (e.g. clustering=T)

Value

A list containing:

rich

A data table containing normalized rich-club coefficients and p-values

small

A data table with small-world parameters

rand

A data table with some global graph measures for all random graphs generated

Details

The steps that are performed are:

  1. N random graphs are generated for each group and density/threshold (and subject if you have subject-specific graphs).

  2. These graphs are all written to disk in savedir. All of these are read back into R and combined into lists; these lists are also written to disk (in a sub-directory named ALL), so you can delete the individual .rds files afterwards.

  3. Small world parameters are calculated, along with values for a few global graph measures that may be of interest.

  4. Normalized rich club coefficients and associated p-values will be calculated.

See Also

small.world

Other Random graph functions: RandomGraphs, RichClub

Examples

Run this code
# NOT RUN {
rand_all <- analysis_random_graphs(g.norm, 1e2,
  savedir='/home/cwatson/dti/rand', clustering=F)
# }

Run the code above in your browser using DataLab