Generates the density distribution or the accumulated distribution function Exp-G

exp_G(G, density = FALSE)

Arguments

G

Cumulative distribution function (baseline)

density

By default, density = FALSE, that is, it returns the cumulative distribution function \(Exp-G\). If density = TRUE, then the \(Exp-G\) density function will be reinforced.

Value

The probability density function or the cumulative distribution function will be returned.

Details

This function generates the probability density function or the accumulated distribution function \(Exp-G\), for any specified \(G\). Exp-G will have one more parameter, being it \(s > 0\).

Examples

cdf_w <- function(x, beta, lambda) { 1 - exp(-(lambda * x)^beta) } # Exp-Weibull density: pdf_exp_w <- exp_G(G = cdf_w, density = TRUE) # Testing if exp_w is density: integrate( f = pdf_exp_w, lower = 0, upper = Inf, beta = 1.2, lambda = 1.3, s = 2.1 )
#> 1 with absolute error < 2.2e-05
# Exp-Weibull (accumulated distribution): cdf_exp_w <- exp_G(G = cdf_w, density = FALSE) # Testing whether it is cumulative distribution: cdf_exp_w(x = 0, beta = 1.2, lambda = 1.3, s = 2.1) # in 0
#> [1] 0
cdf_exp_w(x = Inf, beta = 1.2, lambda = 1.3, s = 2.1) # in Inf
#> [1] 1