DEL: The Delaporte distribution for fitting a GAMLSS model

DELR Documentation

The Delaporte distribution for fitting a GAMLSS model

Description

The DEL() function defines the Delaporte distribution, a three parameter discrete distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss(). The functions dDEL, pDEL, qDEL and rDEL define the density, distribution function, quantile function and random generation for the Delaporte DEL(), distribution.

Usage

DEL(mu.link = "log", sigma.link = "log", nu.link = "logit")
dDEL(x, mu=1, sigma=1, nu=0.5, log=FALSE)
pDEL(q, mu=1, sigma=1, nu=0.5, lower.tail = TRUE, 
        log.p = FALSE)
qDEL(p, mu=1, sigma=1, nu=0.5,  lower.tail = TRUE, 
     log.p = FALSE,  max.value = 10000)        
rDEL(n, mu=1, sigma=1, nu=0.5, max.value = 10000)

Arguments

mu.link

Defines the mu.link, with "log" link as the default for the mu parameter

sigma.link

Defines the sigma.link, with "log" link as the default for the sigma parameter

nu.link

Defines the nu.link, with "logit" link as the default for the nu parameter

x

vector of (non-negative integer) quantiles

mu

vector of positive mu

sigma

vector of positive dispersion parameter

nu

vector of nu

p

vector of probabilities

q

vector of quantiles

n

number of random values to return

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]

max.value

a constant, set to the default value of 10000 for how far the algorithm should look for q

Details

The probability function of the Delaporte distribution is given by

f(y|\mu,\sigma,\nu)= \frac{e^{-\mu \nu}}{\Gamma(1/\sigma)}\left[ 1+\mu \sigma (1-\nu)\right]^{-1/\sigma} S

where

S= \sum_{j=0}^{y} \left( { y \choose j } \right) \frac{\mu^y \nu^{y-j}}{y!}\left[\mu + \frac{1}{\sigma(1-\nu)}\right]^{-j} \Gamma\left(\frac{1}{\sigma}+j\right)

for y=0,1,2,...,\infty where \mu>0 , \sigma>0 and 0 < \nu<1. This distribution is a parametrization of the distribution given by Wimmer and Altmann (1999) p 515-516 where \alpha=\mu \nu, k=1/\sigma and \rho=[1+\mu\sigma(1-\nu)]^{-1}. For more details see pp 506-507 of Rigby et al. (2019).

Value

Returns a gamlss.family object which can be used to fit a Delaporte distribution in the gamlss() function.

Note

The mean of Y is given by E(Y)=\mu and the variance by V(Y)=\mu+\mu^2 \sigma \left( 1-\nu\right)^2.

Author(s)

Rigby, R. A., Stasinopoulos D. M. and Marco Enea

References

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.

Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC,\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/9780429298547")}. An older version can be found in https://www.gamlss.com/.

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v023.i07")}.

Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/b21973")}

Wimmer, G. and Altmann, G (1999). Thesaurus of univariate discrete probability distributions . Stamn Verlag, Essen, Germany

(see also https://www.gamlss.com/).

See Also

gamlss.family, SI , SICHEL

Examples

 DEL()# gives information about the default links for the  Delaporte distribution 
#plot the pdf using plot 
plot(function(y) dDEL(y, mu=10, sigma=1, nu=.5), from=0, to=100, n=100+1, type="h") # pdf
# plot the cdf
plot(seq(from=0,to=100),pDEL(seq(from=0,to=100), mu=10, sigma=1, nu=0.5), type="h")   # cdf
# generate random sample
tN <- table(Ni <- rDEL(100, mu=10, sigma=1, nu=0.5))
r <- barplot(tN, col='lightblue')
# fit a model to the data 
# libary(gamlss)
# gamlss(Ni~1,family=DEL, control=gamlss.control(n.cyc=50))

gamlss.dist documentation built on Aug. 24, 2023, 1:06 a.m.