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

Description Usage Arguments Value See Also

View source: R/network_distributions.R

Description

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

Usage

1
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


osofr/simcausal documentation built on Jan. 6, 2019, 3:05 a.m.