Description Usage Arguments Details Value Note Author(s) References See Also Examples

`rgraph`

generates random draws from a Bernoulli graph distribution, with various parameters for controlling the nature of the data so generated.

1 2 |

`n` |
The size of the vertex set (|V(G)|) for the random graphs |

`m` |
The number of graphs to generate |

`tprob` |
Information regarding tie (edge) probabilities; see below |

`mode` |
“digraph” for directed data, “graph” for undirected data |

`diag` |
Should the diagonal entries (loops) be set to zero? |

`replace` |
Sample with or without replacement from a tie list (ignored if |

`tielist` |
A vector of edge values, from which the new graphs should be bootstrapped |

`return.as.edgelist` |
logical; should the resulting graphs be returned in edgelist form? |

`rgraph`

is a reasonably versatile routine for generating random network data. The graphs so generated are either Bernoulli graphs (graphs in which each edge is a Bernoulli trial, independent conditional on the Bernoulli parameters), or are bootstrapped from a user-provided edge distribution (very handy for CUG tests). In the latter case, edge data should be provided using the `tielist`

argument; the exact form taken by the data is irrelevant, so long as it can be coerced to a vector. In the former case, Bernoulli graph probabilities are set by the `tprob`

argument as follows:

If

`tprob`

contains a single number, this number is used as the probability of all edges.If

`tprob`

contains a vector, each entry is assumed to correspond to a separate graph (in order). Thus, each entry is used as the probability of all edges within its corresponding graph.If

`tprob`

contains a matrix, then each entry is assumed to correspond to a separate edge. Thus, each entry is used as the probability of its associated edge in each graph which is generated.Finally, if

`tprob`

contains a three-dimensional array, then each entry is assumed to correspond to a particular edge in a particular graph, and is used as the associated probability parameter.

Finally, note that `rgraph`

will symmetrize all generated networks if `mode`

is set to “graph” by copying down the upper triangle. The lower half of `tprob`

, where applicable, must still be specified, however.

A graph stack

The famous mathematicians referenced in this man page now have misspelled names, due to R's difficulty with accent marks.

Carter T. Butts buttsc@uci.edu

Erdos, P. and Renyi, A. (1960). “On the Evolution of Random Graphs.” *Public Mathematical Institute of Hungary Academy of Sciences,* 5:17-61.

Wasserman, S., and Faust, K. (1994). *Social Network Analysis: Methods and Applications*. Cambridge: Cambridge University Press.

1 2 3 4 5 6 |

sna documentation built on May 19, 2017, 10:35 p.m.

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

Please suggest features or report bugs in the GitHub issue tracker.

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.