simnb: Simulate from a Negative Binomial Distribution

Description Usage Arguments Value Note References See Also Examples

Description

Functions to generate random samples from a Negative Binomial Probability Distribution

Usage

1
simnb(n=100, v=c(5,0.2), maxdeg=10000)

Arguments

n

number of samples to draw.

v

Negative Binomial parameters: expected count and probability of another.

maxdeg

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

Value

vector of random draws or samples.

Note

See the working papers on http://www.csss.washington.edu/Papers 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

anbmle, dnb

Examples

1
2
3
4
5
6
# Now, simulate a Negative Binomial distribution over 100
# observations with lognormal mean -1 and lognormal standard deviation 1.

set.seed(1)
s4 <- simnb(n=100, v=c(5,0.2))
table(s4)

degreenet documentation built on May 1, 2019, 8:08 p.m.