iZIP_Distribution: The interpretable Zero-Inflated Poisson (iZIP) Distribution.

Description Usage Arguments Value Examples

Description

Density, distribution function, quantile function and random generation for the interpretable Zero-Inflated Poisson with parameter mu and nu

Usage

1
2
3
4
5
6
7
dizip(x, mu, nu, pi, ref.lambda = 1, log.p = FALSE)

pizip(q, mu, nu, pi, ref.lambda = 1, lower.tail = TRUE, log.p = FALSE)

qizip(p, mu, nu, pi, ref.lambda = 1, lower.tail = TRUE, log.p = FALSE)

rizip(n, mu, nu, pi, ref.lambda = 1)

Arguments

x, q

vector of quantiles

mu, nu

mean and baseline zero inflation odds parameters. Must be strictly positive.

pi

an alternative way than nu to parametrized the distribution. Must be between 0 and 1.

ref.lambda

numeric; Baseline Poisson rate. Default is 1.

log.p

logical; if TRUE, probabilities/densities p are returned as log(p).

lower.tail

logical; if TRUE (default), probabilities are P(X ≤ x), otherwise, P(X>x).

p

vector of probabilities

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Value

dizip gives the density, pizip gives the distribution function, qizip gives the quantile function, and rizip generates random deviates.

Invalid arguments will result in return value NaN, with a warning.

The length of the results is determined by n for rizip, and is the maximum of the lengths of the numerical arguments for the other functions.

The numerical arguments other than n are recycled to the length of the results. Only the first argument of the logical arguments are used.

Examples

1
2
3
4
5
dizip(0:5, mu = 2, nu = 1.2)
pizip(5, mu = 2, nu = 1.2)
p <- (1:9) / 10
qizip(p, mu = 2, nu = 1)
rizip(10, mu = 2, nu = 4)

thomas-fung/izipr documentation built on Dec. 23, 2021, 9:57 a.m.