qzinb: The Zero-Inflated Negative Binomial Distribution

Description Usage Arguments Value Examples

Description

The Zero-Inflated Negative Binomial Distribution

Usage

1
qzinb(p, size, mu, rho, lower.tail = TRUE, log.p = FALSE)

Arguments

p

A vector of probabilities

size

The dispersion paramater used in dnbinom

mu

The mean parameter used in dnbinom.

rho

The zero-inflation parameter.

lower.tail

Logical; if TRUE, then probabilities are P(X <= x). Otherwise, P(X > x).

log.p

Logical; if TRUE, then exp(p) is used.

Value

The quantiles for the given probabilities.

Examples

1
2
3
4
5
6
x <- rzinb(10, 1, 10, 0.1)
p <- pzinb(x, 1, 10, 0.1)
y <- qzinb(p, 1, 10, 0.1)
all(x == y)
# Compute P(0 < X < 5) for X ~ ZINB(1, 10, 0.1)
sum(dzinb(0:5, 1, 10, 0.1))

SeqNet documentation built on July 9, 2021, 9:08 a.m.