dztplnm {ztpln}R Documentation

The zero-truncated compund poisson-lognormal distributions mixture

Description

Density function and random generation for Zero-Truncated Poisson Lognormal distribution with parameters mu, sig, and theta.

Usage

dztplnm(x, mu, sig, theta, log = FALSE, type1 = TRUE)

rztplnm(n, mu, sig, theta, type1 = TRUE)

Arguments

x

vector of (non-negative integer) quantiles.

mu

vector of mean of lognormal distribution in sample.

sig

vector standard deviation of lognormal distribution in sample.

theta

vector of mixture weights

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

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

dztplnm gives the (log) density and rztplnm generates random variates. function, qpois gives the quantile function, and rpois generates random deviates.

See Also

dztpln

Examples

rztplnm(n = 100, mu = c(0, 5), sig = c(1, 2), theta = c(0.2, 0.8))
dztplnm(x = 1:100, mu = c(0, 5), sig = c(1, 2), theta = c(0.2, 0.8))
dztplnm(x = 1:100, mu = c(0, 5), sig = c(1, 2), theta = c(0.2, 0.8), type1 = FALSE)

[Package ztpln version 0.1.2 Index]