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

DBH(mu.link = "logit")

Arguments

mu.link

defines the mu.link, with "logit" link as the default for the mu parameter. Other links are "probit" and "cloglog"'(complementary log-log)

Value

Returns a gamlss.family object which can be used to fit a Discrete Burr-Hatke distribution in the gamlss() function.

Details

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

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

The pmf is log-convex for all values of \(0 < \mu < 1\), where \(\frac{f(x+1;\mu)}{f(x;\mu)}\) is an increasing function in \(x\) for all values of the parameter \(\mu\).

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

References

El-Morshedy M, Eliwa MS, Altun E (2020). “Discrete Burr-Hatke distribution with properties, estimation methods and regression model.” IEEE access, 8, 74359--74370.

See also

Author

Valentina Hurtado Sepulveda, vhurtados@unal.edu.co

Examples

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

library(gamlss)
#> Loading required package: splines
#> Loading required package: gamlss.data
#> 
#> Attaching package: 'gamlss.data'
#> The following object is masked from 'package:datasets':
#> 
#>     sleep
#> Loading required package: gamlss.dist
#> Loading required package: nlme
#> Loading required package: parallel
#>  **********   GAMLSS Version 5.4-22  ********** 
#> For more on GAMLSS look at https://www.gamlss.com/
#> Type gamlssNews() to see new features/changes/bug fixes.
mod1 <- gamlss(y~1, family=DBH,
               control=gamlss.control(n.cyc=500, trace=FALSE))

# Extracting the fitted values for mu
# using the inverse logit function
inv_logit <- function(x) exp(x) / (1+exp(x))
inv_logit(coef(mod1, parameter="mu"))
#> (Intercept) 
#>   0.7572509 

# Example 2
# Generating random values under some model

# A function to simulate a data set with Y ~ DBH
gendat <- function(n) {
  x1 <- runif(n)
  mu    <- inv_logit(-3 + 5 * x1)
  y <- rDBH(n=n, mu=mu)
  data.frame(y=y, x1=x1)
}

datos <- gendat(n=150)

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

summary(mod2)
#> Warning: summary: vcov has failed, option qr is used instead
#> ******************************************************************
#> Family:  c("DBH", "Burr Hatke") 
#> 
#> Call:  
#> gamlss(formula = y ~ x1, family = DBH, data = datos, control = gamlss.control(n.cyc = 500,  
#>     trace = FALSE)) 
#> 
#> Fitting method: RS() 
#> 
#> ------------------------------------------------------------------
#> Mu link function:  logit
#> Mu Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept)  -3.3473     0.6124  -5.466 1.91e-07 ***
#> x1            5.4145     0.8583   6.309 3.08e-09 ***
#> ---
#> 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:     192.5091 
#>             AIC:     196.5091 
#>             SBC:     202.5304 
#> ******************************************************************

# Example 3
# number of carious teeth among the four deciduous molars.
# Taken from EL-MORSHEDY (2020) page 74364.

y <- rep(0:4, times=c(64, 17, 10, 6, 3))

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

# Extracting the fitted values for mu
# using the inverse link function
inv_logit <- function(x) 1/(1 + exp(-x))
inv_logit(coef(mod3, what="mu"))
#> (Intercept) 
#>   0.6712271