dzinb: The Zero-Inflated Negative Binomial Distribution

Description Usage Arguments Value Examples

View source: R/gen_zinb.R

Description

The Zero-Inflated Negative Binomial Distribution

Usage

1
dzinb(x, size, mu, rho = 0, log = FALSE)

Arguments

x

A vector of quantities.

size

The dispersion paramater used in dnbinom.

mu

The distribution mean.

rho

The zero-inflation parameter.

log

Logical; if TRUE, then log(d) is returned.

Value

The value(s) of the density function evaluated at x.

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

tgrimes/SeqNet documentation built on Sept. 1, 2020, 7:50 a.m.