CJ2: The two-parameter Chris-Jerry distribution family

CJ2R Documentation

The two-parameter Chris-Jerry distribution family

Description

The function CJ2() defines The two-parameter Chris-Jerry distribution, a two parameter distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss().

Usage

CJ2(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.

Details

The two-parameter Chris-Jerry distribution with parameters mu and sigma has density given by

f(x; \sigma, \mu) = \frac{\mu^2}{\sigma \mu + 2} (\sigma + \mu x^2) e^{-\mu x}; \quad x > 0, \quad \mu > 0, \quad \sigma > 0

Note: In this implementation we changed the original parameters \theta for \mu and \lambda for \sigma we did it to implement this distribution within gamlss framework.

Value

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

Author(s)

Manuel Gutierrez Tangarife, mgutierrezta@unal.edu.co

References

Chinedu, Eberechukwu Q., et al. "New lifetime distribution with applications to single acceptance sampling plan and scenarios of increasing hazard rates" Symmetry 15.10 (2023): 188.

See Also

dCJ2

Examples

# Example 1
# Generating some random values with
# known mu and sigma
y <- rCJ2(n=500, mu=1, sigma=1.5)

# Fitting the model
require(gamlss)

mod1 <- gamlss(y~1, sigma.fo=~1, family=CJ2,
               control=gamlss.control(n.cyc=5000, trace=TRUE))

# Extracting the fitted values for mu, sigma
# using the inverse link function
exp(coef(mod1, what="mu"))
exp(coef(mod1, what="sigma"))

# Example 2
# Generating random values under some model
gendat <- function(n) {
  x1 <- runif(n, min=0, max=5)
  x2 <- runif(n, min=0, max=5)
  mu <- exp(-0.2 + 1.5 * x1)
  sigma <- exp(1 - 0.7 * x2)
  y <- rCJ2(n=n, mu, sigma)
  data.frame(y=y, x1=x1, x2=x2)
}

set.seed(123)
datos <- gendat(n=500)

mod2 <- gamlss(y~x1, sigma.fo=~x2, family=CJ2, data=datos,
               control=gamlss.control(n.cyc=5000, trace=TRUE))

summary(mod2)

ousuga/RelDists documentation built on July 4, 2025, 10:55 a.m.