The function UMB() defines the Unit Maxwell-Boltzmann distribution, a one parameter distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss().

UMB(mu.link = "log")

Arguments

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

Value

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

Details

The Unit Maxwell-Boltzmann distribution with parameter \(\mu\) has a support in \((0, 1)\) and density given by

\(f(x| \mu) = \frac{\sqrt(2/\pi) \log^2(1/x) \exp(-\frac{\log^2(1/x)}{2\mu^2})}{\mu^3 x} \)

for \(0 < x < 1\) and \(\mu > 0\).

References

Biçer, C., Bakouch, H. S., Biçer, H. D., Alomair, G., Hussain, T., y Almohisen, A. (2024). Unit Maxwell-Boltzmann Distribution and Its Application to Concentrations Pollutant Data. Axioms, 13(4), 226.

See also

Examples

# Example 1
# Generating some random values with
# known mu
y <- rUMB(n=300, mu=0.5)

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

# Example 2
# Generating random values under some model

# A function to simulate a data set with Y ~ UMB
gendat <- function(n) {
  x1 <- runif(n)
  mu <- exp(-0.5 + 1 * x1)
  y <- rUMB(n=n, mu=mu)
  data.frame(y=y, x1=x1)
}

datos <- gendat(n=300)

mod2 <- gamlss(y~x1,
               family=UMB, data=datos,
               control=gamlss.control(n.cyc=500, trace=TRUE))
#> GAMLSS-RS iteration 1: Global Deviance = -389.3838 
#> GAMLSS-RS iteration 2: Global Deviance = -389.3839 
summary(mod2)
#> Warning: summary: vcov has failed, option qr is used instead
#> ******************************************************************
#> Family:  c("UMB", "Unit Maxwell-Boltzmann") 
#> 
#> Call:  
#> gamlss(formula = y ~ x1, family = UMB, data = datos, control = gamlss.control(n.cyc = 500,  
#>     trace = TRUE)) 
#> 
#> Fitting method: RS() 
#> 
#> ------------------------------------------------------------------
#> Mu link function:  log
#> Mu Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept) -0.52642    0.05151  -10.22   <2e-16 ***
#> x1           1.06732    0.08675   12.30   <2e-16 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> ------------------------------------------------------------------
#> No. of observations in the fit:  300 
#> Degrees of Freedom for the fit:  2
#>       Residual Deg. of Freedom:  298 
#>                       at cycle:  2 
#>  
#> Global Deviance:     -389.3839 
#>             AIC:     -385.3839 
#>             SBC:     -377.9763 
#> ******************************************************************