random_network {snowboot}R Documentation

Construct Artificial Networks

Description

This function constructs an artificial network from a given distribution. Only 11 distributions are available.

Usage

random_network(n, distrib, param = NULL, degree = NULL, take.p = 0.05)

Arguments

n

the number of nodes in the desired network.

distrib

an atomic character representing the desired degree distribution. User may choose from 11 available distributions: "fixed", "pois", "ztpois", "geom", "nbinom", "ztgeom", "poly.log", "logarithmic", "power.law", "full" (fully connected), or "none" (no element connected).

param

the distribution parameters. If the function is "fixed", param is a vector of degrees.

degree

an optional vector of degrees that must be of length n. The default is degree = NULL.

take.p

a number between 0 and 1 representing the proportion to take for elimination with each iteration.

Value

A list consisting of:

edges

The edgelist of the network. A two column matrix where each row is an edge.

degree

The degree sequence of the network, which is an integer vector of length n.

degree.left

A vector of length n that should be all zeroes.

n

The network order. The order for every network is 2000.

Examples

a <- random_network(1000, "poly.log", c(2, 13))

[Package snowboot version 1.0.2 Index]