The function DIKUM() defines the discrete Inverted Kumaraswamy distribution, a two parameter distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss().

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

Arguments

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

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

Details

The discrete Inverted Kumaraswamy distribution with parameters \(\mu\) and \(\sigma\) has a support 0, 1, 2, ... and density given by

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

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

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

References

El-Helbawy, A. A., Hegazy, M. A., Al-Dayian, G. R., & Abd EL-Kader, R. E. (2022). A discrete analog of the inverted Kumaraswamy distribution: properties and estimation with application to COVID-19 data. Pakistan Journal of Statistics and Operation Research, 18(1), 297-328.

See also

Author

Daniel Felipe Villa Rengifo, dvilla@unal.edu.co

Examples

# Example 1
# Generating some random values with
# known mu and sigma
set.seed(150)
y <- rDIKUM(1000, mu=1, sigma=5)

# Fitting the model
library(gamlss)
mod1 <- gamlss(y ~ 1, sigma.fo = ~1, family=DIKUM,
               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) 
#>   0.9977962 
exp(coef(mod1, what="sigma"))
#> (Intercept) 
#>    4.955013 

# Example 2
# Generating random values under some model

library(gamlss)

# A function to simulate a data set with Y ~ DIKUM
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 <- rDIKUM(n=n, mu=mu, sigma=sigma)
  data.frame(y=y, x1=x1, x2=x2)
}

dat <- gendat(n=1000)

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

summary(mod2)
#> Warning: summary: vcov has failed, option qr is used instead
#> ******************************************************************
#> Family:  c("DIKUM", "discrete-Inverted-Kumaraswamy") 
#> 
#> Call:  gamlss(formula = y ~ x1, sigma.formula = ~x2, family = "DIKUM",  
#>     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.1570     0.2271   5.096 4.15e-07 ***
#> x1           -2.8971     0.4560  -6.353 3.20e-10 ***
#> ---
#> 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.7099     0.3383   5.055 5.13e-07 ***
#> x2           -2.7532     0.6734  -4.089 4.69e-05 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> ------------------------------------------------------------------
#> No. of observations in the fit:  1000 
#> Degrees of Freedom for the fit:  4
#>       Residual Deg. of Freedom:  996 
#>                       at cycle:  13 
#>  
#> Global Deviance:     6219.8 
#>             AIC:     6227.8 
#>             SBC:     6247.431 
#> ******************************************************************