The function DMOLBE() defines the Discrete Marshall-Olkin Length Biased Exponential distribution, a two parameter distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss().

DMOLBE(mu.link = "log", sigma.link = "log")

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.

Value

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

Details

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

\(f(x | \mu, \sigma) = \frac{\sigma ((1+x/\mu)\exp(-x/\mu)-(1+(x+1)/\mu)\exp(-(x+1)/\mu))}{(1-(1-\sigma)(1+x/\mu)\exp(-x/\mu)) ((1-(1-\sigma)(1+(x+1)/\mu)\exp(-(x+1)/\mu))}\)

with \(\mu > 0\) and \(\sigma > 0\)

References

Aljohani HM, Ahsan-ul-Haq M, Zafar J, Almetwally EM, Alghamdi AS, Hussam E, Muse AH (2023). “Analysis of Covid-19 data using discrete Marshall-Olkinin Length Biased Exponential: Bayesian and frequentist approach.” Scientific Reports, 13(1), 12243.

See also

Author

Olga Usuga, olga.usuga@udea.edu.co

Examples

# Example 1
# Generating some random values with
# known mu and sigma
set.seed(1234)
y <- rDMOLBE(n=100, mu=10, sigma=7)

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

# Extracting the fitted values for mu and sigma
# using the inverse link function
exp(coef(mod1, what='mu'))
#> (Intercept) 
#>    9.042679 
exp(coef(mod1, what='sigma'))
#> (Intercept) 
#>    6.713267 

# Example 2
# Generating random values under some model

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

set.seed(123)
dat <- gendat(n=350)

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

summary(mod2)
#> Warning: summary: vcov has failed, option qr is used instead
#> ******************************************************************
#> Family:  c("DMOLBE", "Discrete Marshall-Olkin Length Biased Exponential" ) 
#> 
#> Call:  gamlss(formula = y ~ x1, sigma.formula = ~x2, family = DMOLBE,  
#>     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.1253     0.3342   3.367 0.000845 ***
#> x1           -3.0347     0.6771  -4.482 1.01e-05 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> ------------------------------------------------------------------
#> Sigma link function:  log
#> Sigma Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)
#> (Intercept)   1.2774     0.8489   1.505    0.133
#> x2           -1.6791     1.6745  -1.003    0.317
#> 
#> ------------------------------------------------------------------
#> No. of observations in the fit:  350 
#> Degrees of Freedom for the fit:  4
#>       Residual Deg. of Freedom:  346 
#>                       at cycle:  9 
#>  
#> Global Deviance:     952.4395 
#>             AIC:     960.4395 
#>             SBC:     975.8712 
#> ******************************************************************