fi.zmpl: Zero Modified Poisson-Lindley (ZMPL) distribution

Description Usage Arguments Details Author(s) References Examples

Description

The fuction ZMPL() defines the ZMPL distribution, a two paramenter distribution. The zero modified Poisson-Lindley distribution is similar to the Poisson-Lindley distribution but allows zeros as y values. The extra parameter models the probabilities at zero. The functions dZMPL, pZMPL, qZMPL and rZMPL define the density, distribution function, quantile function and random generation for the zero modified Poisson-Lindley distribution. plotZMPL can be used to plot the distribution. meanZMPL calculates the expected value of the response for a fitted model.

Usage

1
2
3
4
5
6
dZMPL(x, theta = 1, p0=0.1, log = FALSE)
pZMPL(q, theta = 1, p0=0.1, lower.tail = TRUE, log.p = FALSE)
qZMPL(p, theta = 1, p0=0.1, lower.tail = TRUE, log.p = FALSE)
rZMPL(n, theta = 1, p0=0.1)
plotZMPL(theta = 1, p0=0.1, from = 0, to = 0.999, n = 101, ...)
meanZMPL(obj)

Arguments

theta

theta parameter values

p0

p0 parameter values

x, q

vector of observations/quantiles

log,

log.p logical; if TRUE, probabilities p are given 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.

from

where to start plotting the distribution from

to

up to where to plot the distribution

...

other graphical parameters for plotting

Details

The probability massa function of the is given by

f_{X}(x;θ,p0) = p0 + (1-p0)*P[Y=0] I(y=0) + (1-p0)*P[Y>0] I(y>0)

where

P[Y=y]

is a probability massa function of the Poisson-Lindley distribution.

Author(s)

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

References

Bourguignon, M., Xavier, D., Santos-Neto, M., Tomazella, V. (2017) The Modified Poisson-Lindley distribution: A model for overdispersed and underdispersed count data. manuscript.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
FIZMPL()
theta <- seq(0.05,1,l=100)
aux0 <- - ((theta^2)*(theta+2)/( (theta^2) +3*theta+1) )
p0 <- seq(0,1,l=100)
g <- expand.grid(x = theta, y = p0)
z <- FIZMPL(theta,p0)
z[z<0] <- 0
g$z <- z
print(wireframe(z ~ x * y  ,g, xlab=expression(theta), scales = list(arrows = FALSE), ylab=expression(pi), zlab = "FI(X)") )


theta <- seq(0.05,1,l=100)
aux0 <- - ((theta^2)*(theta+2)/( (theta^2) +3*theta+1) )
p0 <- seq(min(aux0),0,l=100)
g <- expand.grid(x = theta, y = p0)
z <- FIZMPL(theta,p0)
z[z<0] <- 0
g$z <- z
print(wireframe(z ~ x * y  ,g, xlab=expression(theta), scales = list(arrows = FALSE), ylab=expression(pi), zlab = "FI(X)") )

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