rnet.SmWorld: Call 'igraph::sample_smallworld' to Generate Random Graph...

Description Usage Arguments Value See Also

View source: R/network_distributions.R

Description

Call igraph::sample_smallworld and convert the output to simcausal network matrix. The parameters are the same as those of igraph::sample_smallworld. The loop edges aren't allowed (loops = FALSE) and the multiple edges aren't allowed either multiple = FALSE.

Usage

1
rnet.SmWorld(n, dim, nei, p)

Arguments

n

Size of the network graph (the number of nodes).

dim

Same as in igraph::sample_smallworld: Integer constant, the dimension of the starting lattice.

nei

Same as in igraph::sample_smallworld: Integer constant, the neighborhood within which the vertices of the lattice will be connected.

p

Same as in igraph::sample_smallworld: Real constant between zero and one, the rewiring probability.

Value

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

See Also

rnet.gnp, rnet.gnm


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