exp_G: Generates the density distribution or the accumulated...

Description Usage Arguments Details Value Examples

View source: R/exp-G.R

Description

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

Usage

1

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.

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.

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
)

# 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
cdf_exp_w(x = Inf, beta = 1.2, lambda = 1.3, s = 2.1) # in Inf

prdm0/MarshallOlkinPSG documentation built on Dec. 22, 2021, 9:51 a.m.