Last data update: 2014.03.03

R: probability density function for the Poisson lognormal...
dpoilogR Documentation

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?

Details

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

Value

dpoilog

returns that densities

rpoilog

returns the random counts

Author(s)

Scott Olesen swo@mit.edu

See Also

poilogMLE

Examples

# 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))

Results