qzmpl: Zero Modified Poisson-Lindley (ZMPL) distribution

Description Usage Arguments Details Value Note Author(s) References Examples

Description

Density, distribution function, quantile function and random generation for the ZMPL distribution.

Usage

1
2
3
4
dzmpl(x, theta,  p0 = 0, log = FALSE)
pzmpl(q, theta = 5, p0 = 0, lower.tail = TRUE, log.p = FALSE)
qzmpl(p, theta = 5, p0 = 0, lower.tail = TRUE, log.p = FALSE)
rzmpl(n, theta = 5, p0 = 0)

Arguments

p

vector of probabilities.

theta

vector of scale parameter values

p0

vector of shape parameter values

lower.tail

logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]

x, q

vector of observations/quantiles

log,

log.p logical; if TRUE, probabilities p are given as log(p).

n

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

Details

If theta or p0 not specified they assume the default values of 5 and 0, respectively.

The ZMPL distribution has density:

Pr(X=k)=≤ft\{\begin{array}{ll} π + (1 - π)\frac{θ^2(θ + 2)}{(θ + 1)^3},&k = 0, \\&\\(1 - π)\frac{θ^2(k + θ + 2)}{(θ + 1)^{k+3}},&k \in \mathbb{N}^{ {\tiny +}}. \end{array}\right.

Value

returns a object of the ZMPL distribution.

Note

For the function ZMPL(), p0 is the zero-modification parameter and different values lead to different modifications of the ZMPL distribution.

Author(s)

Manoel Santos-Neto mn.neco@gmail.com, Danillo Xavier danilloxavier@gmail.com, Marcelo Bourguignon m.p.bourguignon@gmail.com and Vera Tomazella vera@ufscar.com

References

Santos-Neto, M., Xavier, D., Bourguignon, M. and Tomazella, V. (2017) Zero-Modified Poisson-Lindley distribution with applications in inflated and deflated of zeros. to appear.

Examples

1
2
dat <- rzmpl(1000); plot(table(dat),type="h",xlab="x",ylab="PMF")
fit <- fitzmpl(dat)

zmpldistribution/zmpl documentation built on May 11, 2019, 5:16 p.m.