Learn R Programming

degreenet (version 1.2)

simpln: Simulate from a Poisson Lognormal Distribution

Description

Functions to generate random samples from a Poisson Lognormal Probability Distribution

Usage

simpln(n=100, v=c(0.6,1.2), maxdeg=10000, cutoff=1)

Arguments

n
number of samples to draw.
v
Poisson Lognormal parameters: lognormal mean and lognormal s.d.
maxdeg
Maximum degree to sample (using truncation of the distribution).
cutoff
Calculate estimates conditional on exceeding this value.

Value

  • vector of random draws or samples.

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

aplnmle, dpln

Examples

Run this code
# Now, simulate a Poisson Lognormal distribution over 100
# observations with lognormal mean -1 and lognormal standard deviation 1.

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

Run the code above in your browser using DataLab