Learn R Programming

texmexseq (version 0.3)

dpoilog: probability density function for the Poisson lognormal distribution

Description

Probability density function for the Poisson lognormal distribution, along with methods for drawing random samples from that distribution and fitting experimental data to that distribution.

Usage

dpoilog(n, mu, sig, trunc=TRUE) rpoilog(S, mu, sig, condS=FALSE, keep0=FALSE)

Arguments

n
vector of observed counts
S
number of OTUs to sample
mu
mean of lognormal part of distribution
sig
standard deviation of lognormal part of distribution
trunc
remove weight from zero counts?
condS
are random samples conditional on S?
keep0
do not discard zero counts?

Value

Details

A detailed description of the calculation of these values can be found in the documentation for the dpoilog in the poilog package.

See Also

poilogMLE

Examples

Run this code
# visualize the density function
plot(dpoilog(0:100, mu=1.0, sig=1.0), type='o')

# visualize the empirical distribution of a random sample of 1000 OTUs
hist(rpoilog(1000, mu=1.0, sig=1.0, condS=TRUE))

Run the code above in your browser using DataLab