SICHEL: The Sichel distribution for fitting a GAMLSS model

SICHELR Documentation

The Sichel distribution for fitting a GAMLSS model

Description

The SICHEL() function defines the Sichel distribution, a three parameter discrete distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss(). The functions dSICHEL, pSICHEL, qSICHEL and rSICHEL define the density, distribution function, quantile function and random generation for the Sichel SICHEL(), distribution. The function VSICHEL gives the variance of a fitted Sichel model.

The functions ZASICHEL() and ZISICHEL() are the zero adjusted (hurdle) and zero inflated versions of the Sichel distribution, respectively. That is four parameter distributions.

The functions dZASICHEL, dZISICHEL, pZASICHEL,pZISICHEL, qZASICHEL qZISICHEL rZASICHEL and rZISICHEL define the probability, cumulative, quantile and random generation functions for the zero adjusted and zero inflated Sichel distributions, ZASICHEL(), ZISICHEL(), respectively.

Usage

SICHEL(mu.link = "log", sigma.link = "log", nu.link = "identity")
dSICHEL(x, mu=1, sigma=1, nu=-0.5, log=FALSE)
pSICHEL(q, mu=1, sigma=1, nu=-0.5, lower.tail = TRUE, 
         log.p = FALSE)
qSICHEL(p, mu=1, sigma=1, nu=-0.5,  lower.tail = TRUE, 
        log.p = FALSE, max.value = 10000)        
rSICHEL(n, mu=1, sigma=1, nu=-0.5, max.value = 10000)
VSICHEL(obj)
tofySICHEL(y, mu, sigma, nu)

ZASICHEL(mu.link = "log", sigma.link = "log", nu.link = "identity", 
         tau.link = "logit")
dZASICHEL(x, mu = 1, sigma = 1, nu = -0.5, tau = 0.1, log = FALSE)
pZASICHEL(q, mu = 1, sigma = 1, nu = -0.5, tau = 0.1, 
          lower.tail = TRUE, log.p = FALSE)
qZASICHEL(p, mu = 1, sigma = 1, nu = -0.5, tau = 0.1, 
          lower.tail = TRUE, log.p = FALSE, max.value = 10000)
rZASICHEL(n, mu = 1, sigma = 1, nu = -0.5, tau = 0.1, 
          max.value = 10000)

ZISICHEL(mu.link = "log", sigma.link = "log", nu.link = "identity", 
          tau.link = "logit")
dZISICHEL(x, mu = 1, sigma = 1, nu = -0.5, tau = 0.1, log = FALSE)
pZISICHEL(q, mu = 1, sigma = 1, nu = -0.5, tau = 0.1, 
         lower.tail = TRUE, log.p = FALSE)
qZISICHEL(p, mu = 1, sigma = 1, nu = -0.5, tau = 0.1, 
         lower.tail = TRUE, log.p = FALSE, max.value = 10000)
rZISICHEL(n, mu = 1, sigma = 1, nu = -0.5, tau = 0.1, 
         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 "identity" link as the default for the nu parameter

tau.link

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

x

vector of (non-negative integer) quantiles

mu

vector of positive mu

sigma

vector of positive dispersion parameter sigma

nu

vector of nu

tau

vector of probabilities tau

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

obj

a fitted Sichel gamlss model

y

the y variable, the tofySICHEL() should not be used on its own.

Details

The probability function of the Sichel distribution SICHEL is given by

f(y|\mu,\sigma,\nu)= \frac{(\mu/b)^y K_{y+\nu}(\alpha)}{y!(\alpha \sigma)^{y+\nu} K_\nu(\frac{1}{\sigma})}

for y=0,1,2,...,\infty, \mu>0 , \sigma>0 and -\infty <\nu<\infty where

\alpha^2=\frac{1}{\sigma^2}+\frac{2\mu}{\sigma}

c=K_{\nu+1}(1/\sigma) / K_{\nu}(1/\sigma)

and K_{\lambda}(t) is the modified Bessel function of the third kind see pp 508-510 of Rigby et al. (2019). Note that the above parametrization is different from Stein, Zucchini and Juritz (1988) who use the above probability function but treat \mu, \alpha and \nu as the parameters.

The definition of the zero adjusted Sichel distribution, ZASICHEL and the the zero inflated Sichel distribution, ZISICHEL, are given in pp. 517-518 and pp. 519-520 of of Rigby et al. (2019), respectively.

Value

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

Note

The mean of the above Sichel distribution is \mu and the variance is \mu^2 \left[\frac{2\sigma (\nu+1)}{c} + \frac{1}{c^2}-1\right]

Author(s)

Rigby, R. A., Stasinopoulos D. M., Akantziliotou C 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/.

Rigby, R. A., Stasinopoulos, D. M., & Akantziliotou, C. (2008). A framework for modelling overdispersed count data, including the Poisson-shifted generalized inverse Gaussian distribution. Computational Statistics & Data Analysis, 53(2), 381-393.

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

Stein, G. Z., Zucchini, W. and Juritz, J. M. (1987). Parameter Estimation of the Sichel Distribution and its Multivariate Extension. Journal of American Statistical Association, 82, 938-944.

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

See Also

gamlss.family, PIG , SI

Examples

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

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