rnet.gnp: Call 'igraph::sample_gnp' to Generate Random Graph Object...

View source: R/network_distributions.R

rnet.gnpR Documentation

Call igraph::sample_gnp to Generate Random Graph Object According to the G(n,p) Erdos-Renyi Model

Description

Call igraph::sample_gnp and convert the output to simcausal network matrix.

Usage

rnet.gnp(n, p)

Arguments

n

Size of the network graph (number of nodes).

p

Same as igraph::sample_gnp: The probability for drawing an edge between two arbitrary vertices (G(n,p) graph).

Value

A matrix with n rows, each row lists the indices of friends connected to that particular observation.

See Also

rnet.gnm


simcausal documentation built on Oct. 29, 2022, 1:13 a.m.