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.

1 | ```
analysis_random_graphs(g, N, covars, savedir = ".", ...)
``` |

`g` |
A list object containing all graphs (may be nested) |

`N` |
Integer specifying number of random graphs to generate per individual graph |

`covars` |
Data table of covariates (used for Group and subject names) |

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

`...` |
Other arguments passed to |

First, a number of random graphs are generated for each group and
density/threshold (and subject if you have subject-specific graphs). These
graphs are all written to disk in a location you specify. All of these are
read back into `R`

and combined into large lists; these large lists are
also written to disk (in a sub-directory named `ALL`

), so you can delete
the individual `.rds`

files afterwards. Once all of the random graphs
have been generated, the *small world* parameters are calculated, along
with values for a few global graph measures that may be of interest.
Additionally, the *normalized rich club coefficients* and associated
p-values will be calculated.

A list containing:

`rich` |
A list object 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 |

Christopher G. Watson, cgwatson@bu.edu

```
sim.rand.graph.par, small.world,
rich.club.norm
```

1 2 3 4 5 | ```
## Not run:
rand_all <- random_graph_analysis(g.norm, 1e2, covars.dti,
savedir='~/dti/rand', clustering=F)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.