simwar: Simulate from a Waring Distribution

View source: R/simdist.R

simwarR Documentation

Simulate from a Waring Distribution

Description

Functions to generate random samples from a Waring Probability Distribution

Usage

simwar(n=100, v=c(3.5, 0.1), maxdeg=10000)

Arguments

n

number of samples to draw.

v

Waring parameters: scaling exponent and probability of a new actor.

maxdeg

Maximum degree to sample (using truncation of the distribution).

Value

vector of random draws or samples.

Note

See the papers on https://handcock.github.io/?q=Holland for details

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

awarmle, dwar

Examples

# Now, simulate a Waring distribution over 100
# observations with Waring with exponent 3.5 and probability of a new
# actor 0.1.

set.seed(1)
s4 <- simwar(n=100, v=c(3.5, 0.1))
table(s4)

degreenet documentation built on Sept. 26, 2024, 1:08 a.m.