make_adj_matrix: Create adjacency matrix.

Description Usage Arguments Value Examples

View source: R/make_adj_matrix.R

Description

Undirected adjacency matrix of selected networks.

Usage

1
make_adj_matrix(N, model, seed = NULL)

Arguments

N

number of units.

model

string specifying the type of network. Options are 'sq_lattice' for a circular lattice, 'scale_free' for a scale free network with no isolates according to the Barabasi-Albert model, 'small_world' for a network with no isolates according to the Watts-Strogatz small-world model, 'dcbm' for a network according to the degree corrected stochastic block model.

seed

random number for result replicability.

Value

An N * N numeric matrix, where N corresponds to number of units.

Examples

1
2
3
make_adj_matrix(N = 9, model = 'sq_lattice')
## Not run: make_adj_matrix(N = 10, model = 'sq_lattice')
make_adj_matrix(N = 10, model = 'small_world', seed = 357)

szonszein/interference documentation built on Jan. 10, 2022, 6:35 p.m.