The function POISXL() defines the Discrete Poisson XLindley distribution, one-parameter discrete distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss().

POISXL(mu.link = "log")

Arguments

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

Value

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

Details

The Discrete Poisson XLindley distribution with parameters \(\mu\) has a support 0, 1, 2, ... and mass function given by

\(f(x | \mu) = \frac{\mu^2(x+\mu^2+3(1+\mu))}{(1+\mu)^{4+x}}\); with \(\mu>0\).

Note: in this implementation we changed the original parameters \(\alpha\) for \(\mu\), we did it to implement this distribution within gamlss framework.

References

Ahsan-ul-Haq, M., Al-Bossly, A., El-Morshedy, M., & Eliwa, M. S. (2022). Poisson XLindley distribution for count data: statistical and reliability properties with estimation techniques and inference. Computational Intelligence and neuroscience, 2022(1), 6503670.

See also

Author

Mariana Blandon Mejia, mblandonm@unal.edu.co

Examples

# Example 1
# Generating some random values with
# known mu
y <- rPOISXL(n=1000, mu=1)

# Fitting the model
library(gamlss)
mod1 <- gamlss(y~1, family=POISXL,
               control=gamlss.control(n.cyc=500, trace=FALSE))

# Extracting the fitted values for mu
# using the inverse link function
exp(coef(mod1, what="mu"))
#> (Intercept) 
#>   0.9750579 

# Example 2
# Generating random values under some model

# A function to simulate a data set with Y ~ POISXL
gendat <- function(n) {
  x1 <- runif(n, min=0.4, max=0.6)
  mu <- exp(1.21 - 3 * x1) # 0.75 approximately
  y <- rPOISXL(n=n, mu=mu)
  data.frame(y=y, x1=x1)
}

dat <- gendat(n=1500)

# Fitting the model
mod2 <- NULL
mod2 <- gamlss(y~x1, family=POISXL, data=dat,
               control=gamlss.control(n.cyc=500, trace=FALSE))

summary(mod2)
#> Warning: summary: vcov has failed, option qr is used instead
#> ******************************************************************
#> Family:  c("POISXL", "Poisson-XLindley") 
#> 
#> Call:  
#> gamlss(formula = y ~ x1, family = POISXL, data = dat, control = gamlss.control(n.cyc = 500,  
#>     trace = FALSE)) 
#> 
#> Fitting method: RS() 
#> 
#> ------------------------------------------------------------------
#> Mu link function:  log
#> Mu Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept)   1.5568     0.2296   6.779 1.73e-11 ***
#> x1           -3.6936     0.4536  -8.143 8.03e-16 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> ------------------------------------------------------------------
#> No. of observations in the fit:  1500 
#> Degrees of Freedom for the fit:  2
#>       Residual Deg. of Freedom:  1498 
#>                       at cycle:  3 
#>  
#> Global Deviance:     5424.381 
#>             AIC:     5428.381 
#>             SBC:     5439.007 
#> ******************************************************************

# Example 3
# The counts the number of borers per hill of corn in an
# experiment conducted randomly on 8 hills in 15 replications.
# Taken from Ahsan-ul-Haq et al (2022) page 10.

y <- rep(x=0:8, times=c(43, 35, 17, 11, 5, 4, 1, 2, 2))

mod3 <- gamlss(y~1, family=POISXL,
               control=gamlss.control(n.cyc=500, trace=FALSE))

# Extracting the fitted values for mu
exp(coef(mod3, what="mu"))
#> (Intercept) 
#>   0.8611103 

# Example 4
# The number of mammalian cytogenetic dosimetry lesions produced
# by streptogramin exposure in rabbit.
# Taken from Ahsan-ul-Haq et al (2022) page 10.

y <- rep(x=0:4, times=c(200, 57, 30, 7, 6))

mod4 <- gamlss(y~1, family=POISXL,
               control=gamlss.control(n.cyc=500, trace=FALSE))

# Extracting the fitted values for mu
exp(coef(mod4, what="mu"))
#> (Intercept) 
#>    2.046229