dztplnm {ztpln} | R Documentation |
Density function and random generation for Zero-Truncated
Poisson Lognormal distribution with parameters mu
, sig
, and theta
.
dztplnm(x, mu, sig, theta, log = FALSE, type1 = TRUE)
rztplnm(n, mu, sig, theta, type1 = TRUE)
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. |
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")
dztplnm gives the (log) density and rztplnm generates random variates. function, qpois gives the quantile function, and rpois generates random deviates.
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)