simcmp: Simulate from a Conway Maxwell Poisson Distribution

View source: R/simdist.R

simcmpR Documentation

Simulate from a Conway Maxwell Poisson Distribution

Description

Functions to generate random samples from a Conway Maxwell Poisson Probability Distribution

Usage

simcmp(n=100, v=c(7,2.6), maxdeg=10000)

Arguments

n

number of samples to draw.

v

Conway Maxwell Poisson parameters: lognormal mean and lognormal s.d.

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

acmpmle, dcmp

Examples

# Now, simulate a Conway Maxwell Poisson distribution over 100
# observations with lognormal mean -1 and lognormal standard deviation 1.

set.seed(1)
s4 <- simcmp(n=100, v=c(7,3))
table(s4)

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