Package 'perturbR'

Title: Random Perturbation of Count Matrices
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.
Authors: KM Gates [aut, cre], Zachary Fisher [aut], Cara Arizmendi [aut]
Maintainer: KM Gates <[email protected]>
License: GPL-2
Version: 0.1.3
Built: 2025-02-14 04:57:17 UTC
Source: https://github.com/cran/perturbR

Help Index


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 [email protected]


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")