Learn R Programming

degreenet (version 1.2)

reedmolloy: Generate a (non-random) network with a given degree sequence

Description

Generate a network with a given number of actors with a given degree. The resultant network is not random - that is, is not a random draw from all such networks. This requires the network package.

Usage

reedmolloy(deg, greedy=FALSE, warn=TRUE, verbose=TRUE)

Arguments

deg
vector of counts where element i is the number of actors with degree i.
greedy
Use a greedy algorithm that may perform better for larger networks, and may perform worse.
warn
Give warning with the degree sequence is not compatible with a network.
verbose
Print out details of the progress of the algorithm.

Value

  • If the network package is available, the network is returned as a network object. If not a sociomatrix is returned.

References

Jones, J. H. and Handcock, M. S. "An assessment of preferential attachment as a mechanism for human sexual network formation," Proceedings of the Royal Society, B, 2003, 270, 1123-1128.

See Also

ayulemle, dyule

Examples

Run this code
# Now, simulate a Poisson Lognormal distribution over 100
# observations with mean = -1 and s.d. = 1.

set.seed(2)
s4 <- simpln(n=100, v=c(-1,1))
table(s4)
#
simr <- reedmolloy(s4)
simr

Run the code above in your browser using DataLab