adja_gnp {PNAR}R Documentation

Generation of a network from the Erdos-Renyi model

Description

This function generates a network from the Erdos-Renyi model.

Usage

adja_gnp(N, alpha, directed = FALSE)

Arguments

N

The number of nodes on the network.

alpha

The network density. A value in [0,1] defining the frequency of connections in the network.

directed

Logical scalar, whether to generate a directed network. If TRUE a directed network is generated.

Details

For each pair of nodes it performs a Bernoulli trial with values 1 "draw an edge", 0 "otherwise". Each trial has the same probability of having an edge; this is equal to \alpha*N^{-0.3}, specified based on the number of nodes on the network N and the network density alpha.

Value

A row-normalized non-negative matrix describing the network. The main diagonal entries of the matrix are zeros, all the other entries are non-negative and the maximum sum of elements over the rows equals one.

Author(s)

Mirko Armillotta, Michail Tsagris and Konstantinos Fokianos.

References

Erdos, P. and A. Renyi (1959). On random graphs. Publicationes Mathematicae, 6, 290-297.

See Also

adja

Examples

W <- adja_gnp(N = 20, alpha= 0.1)

[Package PNAR version 1.6 Index]