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

DLD(mu.link = "log")

Arguments

mu.link

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 Lindley distribution in the gamlss() function.

Details

The Discrete Lindley distribution with parameters \(\mu > 0\) has a support 0, 1, 2, ... and density given by

\(f(x | \mu) = \frac{e^{-\mu x}}{1 + \mu} (\mu(1 - 2e^{-\mu}) + (1- e^{-\mu})(1+\mu x))\)

The parameter \(\mu\) can be interpreted as a strict upper bound on the failure rate function

The conventional discrete distributions (such as geometric, Poisson, etc.) are not suitable for various scenarios like reliability, failure times, and counts. Consequently, alternative discrete distributions have been created by adapting well-known continuous models for reliability and failure times. Among these, the discrete Weibull distribution stands out as the most widely used. But models like these require two parameters and not many of the known discrete distributions can provide accurate models for both times and counts, which the Discrete Lindley distribution does.

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

References

Bakouch HS, Jazi MA, Nadarajah S (2014). “A new discrete distribution.” Statistics, 48(1), 200--240.

See also

Author

Yojan Andrés Alcaraz Pérez, yalcaraz@unal.edu.co

Examples

# Example 1
# Generating some random values with
# known mu
y <- rDLD(n=100, mu=0.3)

# Fitting the model
library(gamlss)
mod1 <- gamlss(y~1, family=DLD,
               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.3209459 

# Example 2
# Generating random values under some model

# A function to simulate a data set with Y ~ DLD
gendat <- function(n) {
  x1 <- runif(n)
  mu    <- exp(2 - 4 * x1)
  y <- rDLD(n=n, mu=mu)
  data.frame(y=y, x1=x1)
}

set.seed(1235)
datos <- gendat(n=150)

mod2 <- NULL
mod2 <- gamlss(y~x1, sigma.fo=~x2, family=DLD, data=datos,
                 control=gamlss.control(n.cyc=500, trace=FALSE))

summary(mod2)
#> Warning: summary: vcov has failed, option qr is used instead
#> ******************************************************************
#> Family:  c("DLD", "Lindley") 
#> 
#> Call:  
#> gamlss(formula = y ~ x1, sigma.formula = ~x2, family = DLD, data = datos,  
#>     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)   2.0309     0.1904   10.66   <2e-16 ***
#> x1           -4.0779     0.2780  -14.67   <2e-16 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> ------------------------------------------------------------------
#> No. of observations in the fit:  150 
#> Degrees of Freedom for the fit:  2
#>       Residual Deg. of Freedom:  148 
#>                       at cycle:  2 
#>  
#> Global Deviance:     477.2385 
#>             AIC:     481.2385 
#>             SBC:     487.2597 
#> ******************************************************************