Learn R Programming

gamlss.dist (version 6.1-11)

SI: The Sichel dustribution for fitting a GAMLSS model

Description

The SI() 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 dSI, pSI, qSI and rSI define the density, distribution function, quantile function and random generation for the Sichel SI(), distribution.

Usage

SI(mu.link = "log", sigma.link = "log", nu.link = "identity")
dSI(x, mu = 0.5, sigma = 0.02, nu = -0.5, log = FALSE)
pSI(q, mu = 0.5, sigma = 0.02, nu = -0.5, lower.tail = TRUE, 
       log.p = FALSE)
qSI(p, mu = 0.5, sigma = 0.02, nu = -0.5, lower.tail = TRUE, 
    log.p = FALSE, max.value = 10000)
rSI(n, mu = 0.5, sigma = 0.02, nu = -0.5)
tofyS(y, mu, sigma, nu, what = 1)

Arguments

Value

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

Details

The probability function of the Sichel distribution is given by $$f(y|\mu,\sigma,\nu)= \frac{\mu^y K_{y+\nu}(\alpha)}{y! (\alpha \sigma)^{y+\nu} K_\nu(\frac{1}{\sigma})}$$ where \(\alpha^2=\frac{1}{\sigma^2}+\frac{2\mu}{\sigma}\), for \(y=0,1,2,...,\infty\) where \(\mu>0\) , \(\sigma>0\) and \(-\infty < \nu<\infty\) and \(K_{\lambda}(t)=\frac{1}{2}\int_0^{\infty} x^{\lambda-1} \exp\{-\frac{1}{2}t(x+x^{-1})\}dx\) is the modified Bessel function of the third kind. Note that the above parameterization is different from Stein, Zucchini and Juritz (1988) who use the above probability function but treat \(\mu\), \(\alpha\) and \(\nu\) as the parameters. Note that \(\sigma=[(\mu^2+\alpha^2)^{\frac{1}{2}} -\mu ]^{-1}\). See also pp 510-511 of Rigby et al. (2019).

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, 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, 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. 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, NBI, NBII

Examples

Run this code
SI()# gives information about the default links for the  Sichel distribution 
#plot the pdf using plot 
plot(function(y) dSI(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),pSI(seq(from=0,to=100), mu=10, sigma=1, nu=1), type="h")   # cdf
# generate random sample
tN <- table(Ni <- rSI(100, mu=5, sigma=1, nu=1))
r <- barplot(tN, col='lightblue')
# fit a model to the data 
# library(gamlss)
# gamlss(Ni~1,family=SI, control=gamlss.control(n.cyc=50))

Run the code above in your browser using DataLab