Type: | Package |
Title: | Random Perturbation of Count Matrices |
Version: | 0.1.3 |
Author: | KM Gates [aut, cre], Zachary Fisher [aut], Cara Arizmendi [aut] |
Maintainer: | KM Gates <gateskm@email.unc.edu> |
Description: | The perturbR() function incrementally perturbs network edges (using the rewireR function)and compares the resulting community detection solutions from the rewired networks with the solution found for the original network. These comparisons aid in understanding the stability of the original solution. The package requires symmetric, weighted (specifically, count) matrices/networks. |
Imports: | igraph, ggplot2 |
License: | GPL-2 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 6.1.1 |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2019-02-19 03:13:33 UTC; gateslab |
Repository: | CRAN |
Date/Publication: | 2019-02-19 09:30:03 UTC |
Perturb Networks
Description
The perturbR function incrementally perturbs networks (using the rewireR function) and compares the resulting rewired networks with the orignal. These comparisons aid in understanding the stability of the cluster solution.
Author(s)
KM Gates [aut, cre],
Zachary Fisher [aut],
Cara Arizmendi [aut]
Maintainer: KM Gates gateskm@email.unc.edu
Port of the arandi function from the mcclust package which is no longer maintained.
Description
Port of the arandi function from the mcclust package which is no longer maintained.
Usage
arandi(cl1, cl2, adjust = TRUE)
Example, symmetric weighted count matrix
Description
This object contains a simulated 25 by 25 symmetric, weighted count matrix.
Usage
exampledata
Format
A 25 by 25 symmetric count matrix.
Perturb networks and evaluate subgroup structures.
Description
Randomly rewires networks in increasing degrees of perturbation to evaluate stability of community solutions obtained from Walktrap.
Usage
perturbR(sym.matrix, plot = TRUE, resolution = 0.01, reps = 100,
errbars = FALSE)
Arguments
sym.matrix |
A symmetric, sparse count matrix object |
plot |
Logical, defaults to TRUE |
resolution |
The percentage of edges to iteratively alter. One percent is default, increase to go quicker. |
reps |
The number of repititions to do for each level of perturbation. Decrease to make it go quicker. |
errbars |
Logical, defaults to FALSE. Option to add error bars of one standard deviation above and below the mean for each point. |
Examples
perturbR(exampledata, plot=FALSE, resolution=0.10, reps=1, errbars = FALSE)
Rewire graph by randomly assigning new values for a given degree of perturbation.
Description
Randomly rewires graphs by altering a specific number of edges using Bernoulli trials as described in "The weighted random graph model" by Garlaschelli, New Journal of Physics, 11, (2009), 073005. Only undirected, weigghted count matrices are considered here.
Usage
rewireR(sym.matrix, nperturb, dist)
Arguments
sym.matrix |
A symmetric, sparse count matrix object. |
nperturb |
The number of edges to randomly alter. |
dist |
Option to rewire in a manner that retains overall graph weight regardless of distribution of edge weights. This option is invoked by putting any text into this field. Defaults to "NegBinom" for negative binomial. |
Examples
rewireR(exampledata, nperturb=40, dist = "Normal")
Port of the vi.dist function from the mcclust package which is no longer maintained.
Description
Port of the vi.dist function from the mcclust package which is no longer maintained.
Usage
vi.dist(cl1, cl2, parts = FALSE, base = 2)