Description Usage Arguments Details Value Examples
Generates the density distribution or the accumulated distribution function Exp-G
1 |
G |
Cumulative distribution function (baseline) |
density |
By default, |
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.
The probability density function or the cumulative distribution function will be returned.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.