dztpln: The zero-truncated compund poisson-lognormal distributions

Description Usage Arguments Details Value References See Also Examples

View source: R/dztpln.r

Description

Density function and random generation for Zero-Trauncated Poisson Lognormal distribution with parameters mu and sd sig.

Usage

1
2
3
dztpln(x, mu, sig, log = FALSE, type1 = TRUE)

rztpln(n, mu, sig, type1 = TRUE)

Arguments

x

vector of (non-negative integer) quantiles.

mu

mean of lognormal distribution.

sig

standard deviation of lognormal distribution.

log

logical; if TRUE, probabilities p are given as log(p).

type1

logical; if TRUE, Use type 1 ztpln else use type 2.

n

number of random values to return.

Details

A compound Poisson-lognormal distribution is a Poisson probability distribution where its parameter λ is a random variable with lognormal distribution, that is to say logλ are normally distributed with mean μ and variance σ^2 (Bulmer 1974). The zero-truncated Poisson-lognormal distribution can be derived from a zero-truncated Poisson distribution.

Type 1 ZTPLN truncates zero based on Poisson-lognormal distribution and type 2 ZTPLN truncates zero based on zero-truncated Poisson distribution. For mathematical details, please see vignette("ztpln")

Value

dztpln gives the (log) density and rztpln generates random variates.

References

Bulmer, M. G. 1974. On Fitting the Poisson Lognormal Distribution to Species-Abundance Data. Biometrics 30:101-110.

See Also

dztplnm

Examples

1
2
3
rztpln(n = 10, mu = 0, sig = 1, type1 = TRUE)
rztpln(n = 10, mu = 6, sig = 4, type1 = TRUE)
dztpln(x = 1:5, mu = 1, sig = 2)

mattocci27/ztpln documentation built on Oct. 14, 2021, 12:52 a.m.