Title: | Estimation for some Reliability Distributions |
---|---|
Description: | Parameters estimation and linear regression models for Reliability distributions families reviewed by Almalki & Nadarajah (2014) <doi:10.1016/j.ress.2013.11.010> using Generalized Additive Models for Location, Scale and Shape, aka GAMLSS by Rigby & Stasinopoulos (2005) <doi:10.1111/j.1467-9876.2005.00510.x>. |
Authors: | Freddy Hernandez [aut] |
Maintainer: | Jaime Mosquera <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0 |
Built: | 2025-03-08 03:21:35 UTC |
Source: | https://github.com/ousuga/reldists |
The Additive Weibull distribution
AddW(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
AddW(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
tau.link |
defines the tau.link, with "log" link as the default for the tau parameter. |
Additive Weibull distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a AddW distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Xie M, Lai CD (1996). “Reliability analysis using an additive Weibull model with bathtub-shaped failure rate function.” Reliability Engineering and System Safety, 52, 83–93. doi:10.1016/0951-8320(95)00149-2.
# Example 1 # Generating some random values with # known mu, sigma, nu and tau # Will not be run this example because high number is cycles # is needed in order to get good estimates ## Not run: y <- rAddW(n=100, mu=1.5, sigma=0.2, nu=3, tau=0.8) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family='AddW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) ## End(Not run) # Example 2 # Generating random values under some model # Will not be run this example because high number is cycles # is needed in order to get good estimates ## Not run: n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(1.67 + -3 * x1) sigma <- exp(0.69 - 2 * x2) nu <- 3 tau <- 0.8 x <- rAddW(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=AddW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau")) ## End(Not run)
# Example 1 # Generating some random values with # known mu, sigma, nu and tau # Will not be run this example because high number is cycles # is needed in order to get good estimates ## Not run: y <- rAddW(n=100, mu=1.5, sigma=0.2, nu=3, tau=0.8) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family='AddW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) ## End(Not run) # Example 2 # Generating random values under some model # Will not be run this example because high number is cycles # is needed in order to get good estimates ## Not run: n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(1.67 + -3 * x1) sigma <- exp(0.69 - 2 * x2) nu <- 3 tau <- 0.8 x <- rAddW(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=AddW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau")) ## End(Not run)
The Beta Generalized Exponentiated family
BGE(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
BGE(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
tau.link |
defines the tau.link, with "log" link as the default for the tau parameter. |
The Beta Generalized Exponentiated distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for ,
,
,
and
.
Returns a gamlss.family object which can be used to fit a BGE distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Barreto-Souza W, Santos AH, Cordeiro GM (2010). “The beta generalized exponential distribution.” Journal of Statistical Computation and Simulation, 80(2), 159–172.
# Generating some random values with # known mu, sigma, nu and tau y <- rBGE(n=100, mu = 1.5, sigma =1.7, nu=1, tau=1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family=BGE, control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.5 - x1) sigma <- exp(0.8 - x2) nu <- 1 tau <- 1 x <- rBGE(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=BGE, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau"))
# Generating some random values with # known mu, sigma, nu and tau y <- rBGE(n=100, mu = 1.5, sigma =1.7, nu=1, tau=1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family=BGE, control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.5 - x1) sigma <- exp(0.8 - x2) nu <- 1 tau <- 1 x <- rBGE(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=BGE, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau"))
The Cosine Sine Exponential family
CS2e(mu.link = "log", sigma.link = "log", nu.link = "log")
CS2e(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Cosine Sine Exponential distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
Returns a gamlss.family object which can be used to fit a CS2e distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Chesneau C, Bakouch HS, Hussain T (2018). “A new class of probability distributions via cosine and sine functions with applications.” Communications in Statistics-Simulation and Computation, 1–14.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rCS2e(n=100, mu = 0.1, sigma =1, nu=0.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='CS2e', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.45, max=0.55) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.2 - x1) sigma <- exp(0.8 - x2) nu <- 0.5 x <- rCS2e(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1,family=CS2e, control=gamlss.control(n.cyc=50000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rCS2e(n=100, mu = 0.1, sigma =1, nu=0.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='CS2e', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.45, max=0.55) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.2 - x1) sigma <- exp(0.8 - x2) nu <- 0.5 x <- rCS2e(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1,family=CS2e, control=gamlss.control(n.cyc=50000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
Density, distribution function, quantile function,
random generation and hazard function for the Additive Weibull distribution
with parameters mu
, sigma
, nu
and tau
.
dAddW(x, mu, sigma, nu, tau, log = FALSE) pAddW(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qAddW(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rAddW(n, mu, sigma, nu, tau) hAddW(x, mu, sigma, nu, tau)
dAddW(x, mu, sigma, nu, tau, log = FALSE) pAddW(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qAddW(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rAddW(n, mu, sigma, nu, tau) hAddW(x, mu, sigma, nu, tau)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
shape parameter. |
tau |
shape parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
Additive Weibull Distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for x > 0.
dAddW
gives the density, pAddW
gives the distribution
function, qAddW
gives the quantile function, rAddW
generates random deviates and hAddW
gives the hazard function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Xie M, Lai CD (1996). “Reliability analysis using an additive Weibull model with bathtub-shaped failure rate function.” Reliability Engineering and System Safety, 52, 83–93. doi:10.1016/0951-8320(95)00149-2.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dAddW(x, mu=1.5, sigma=0.5, nu=3, tau=0.8), from=0.0001, to=2, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pAddW(x, mu=1.5, sigma=0.5, nu=3, tau=0.8), from=0.0001, to=2, col="red", las=1, ylab="F(x)") curve(pAddW(x, mu=1.5, sigma=0.5, nu=3, tau=0.8, lower.tail=FALSE), from=0.0001, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qAddW(p, mu=1.5, sigma=0.2, nu=3, tau=0.8), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pAddW(x, mu=1.5, sigma=0.2, nu=3, tau=0.8), from=0, add=TRUE, col="red") ## The random function hist(rAddW(n=10000, mu=1.5, sigma=0.2, nu=3, tau=0.8), freq=FALSE, xlab="x", las=1, main="") curve(dAddW(x, mu=1.5, sigma=0.2, nu=3, tau=0.8), from=0.09, to=5, add=TRUE, col="red") ## The Hazard function curve(hAddW(x, mu=1.5, sigma=0.2, nu=3, tau=0.8), from=0.001, to=1, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dAddW(x, mu=1.5, sigma=0.5, nu=3, tau=0.8), from=0.0001, to=2, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pAddW(x, mu=1.5, sigma=0.5, nu=3, tau=0.8), from=0.0001, to=2, col="red", las=1, ylab="F(x)") curve(pAddW(x, mu=1.5, sigma=0.5, nu=3, tau=0.8, lower.tail=FALSE), from=0.0001, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qAddW(p, mu=1.5, sigma=0.2, nu=3, tau=0.8), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pAddW(x, mu=1.5, sigma=0.2, nu=3, tau=0.8), from=0, add=TRUE, col="red") ## The random function hist(rAddW(n=10000, mu=1.5, sigma=0.2, nu=3, tau=0.8), freq=FALSE, xlab="x", las=1, main="") curve(dAddW(x, mu=1.5, sigma=0.2, nu=3, tau=0.8), from=0.09, to=5, add=TRUE, col="red") ## The Hazard function curve(hAddW(x, mu=1.5, sigma=0.2, nu=3, tau=0.8), from=0.001, to=1, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Beta Generalized Exponentiated distribution
with parameters mu
, sigma
, nu
and tau
.
dBGE(x, mu, sigma, nu, tau, log = FALSE) pBGE(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qBGE(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rBGE(n, mu, sigma, nu, tau) hBGE(x, mu, sigma, nu, tau)
dBGE(x, mu, sigma, nu, tau, log = FALSE) pBGE(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qBGE(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rBGE(n, mu, sigma, nu, tau) hBGE(x, mu, sigma, nu, tau)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
tau |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Beta Generalized Exponentiated Distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for ,
,
,
and
.
dBGE
gives the density, pBGE
gives the distribution
function, qBGE
gives the quantile function, rBGE
generates random deviates and hBGE
gives the hazard function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Barreto-Souza W, Santos AH, Cordeiro GM (2010). “The beta generalized exponential distribution.” Journal of Statistical Computation and Simulation, 80(2), 159–172.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dBGE(x, mu = 1.5, sigma =1.7, nu=1, tau=1), from = 0, to = 3, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pBGE(x, mu = 1.5, sigma =1.7, nu=1, tau=1), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pBGE(x, mu = 1.5, sigma =1.7, nu=1, tau=1, lower.tail = FALSE), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qBGE(p = p, mu = 1.5, sigma =1.7, nu=1, tau=1), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pBGE(x, mu = (1/4), sigma =1, nu=1, tau=2), from = 0, add = TRUE, col = "red") ## The random function hist(rBGE(1000, mu = 1.5, sigma =1.7, nu=1, tau=1), freq = FALSE, xlab = "x", ylim = c(0, 1), las = 1, main = "") curve(dBGE(x, mu = 1.5, sigma =1.7, nu=1, tau=1), from = 0, add = TRUE, col = "red", ylim = c(0, 0.5)) ## The Hazard function( par(mfrow=c(1,1)) curve(hBGE(x, mu = 0.9, sigma =0.5, nu=1, tau=1), from = 0, to = 2, col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dBGE(x, mu = 1.5, sigma =1.7, nu=1, tau=1), from = 0, to = 3, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pBGE(x, mu = 1.5, sigma =1.7, nu=1, tau=1), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pBGE(x, mu = 1.5, sigma =1.7, nu=1, tau=1, lower.tail = FALSE), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qBGE(p = p, mu = 1.5, sigma =1.7, nu=1, tau=1), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pBGE(x, mu = (1/4), sigma =1, nu=1, tau=2), from = 0, add = TRUE, col = "red") ## The random function hist(rBGE(1000, mu = 1.5, sigma =1.7, nu=1, tau=1), freq = FALSE, xlab = "x", ylim = c(0, 1), las = 1, main = "") curve(dBGE(x, mu = 1.5, sigma =1.7, nu=1, tau=1), from = 0, add = TRUE, col = "red", ylim = c(0, 0.5)) ## The Hazard function( par(mfrow=c(1,1)) curve(hBGE(x, mu = 0.9, sigma =0.5, nu=1, tau=1), from = 0, to = 2, col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Cosine Sine Exponential distribution
with parameters mu
, sigma
and nu
.
dCS2e(x, mu, sigma, nu, log = FALSE) pCS2e(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qCS2e(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rCS2e(n, mu, sigma, nu) hCS2e(x, mu, sigma, nu)
dCS2e(x, mu, sigma, nu, log = FALSE) pCS2e(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qCS2e(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rCS2e(n, mu, sigma, nu) hCS2e(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Cosine Sine Exponential Distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
dCS2e
gives the density, pCS2e
gives the distribution
function, qCS2e
gives the quantile function, rCS2e
generates random deviates and hCS2e
gives the hazard function.
Juan Pablo Ramirez
Chesneau C, Bakouch HS, Hussain T (2018). “A new class of probability distributions via cosine and sine functions with applications.” Communications in Statistics-Simulation and Computation, 1–14.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function par(mfrow=c(1,1)) curve(dCS2e(x, mu=1, sigma=0.1, nu =0.1), from=0, to=1, ylim=c(0, 3), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pCS2e(x, mu=1, sigma=0.1, nu =0.1), from=0, to=1, col="red", las=1, ylab="F(x)") curve(pCS2e(x, mu=1, sigma=0.1, nu =0.1, lower.tail=FALSE), from=0, to=1, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qCS2e(p, mu=0.1, sigma=1, nu=0.1), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pCS2e(x, mu=0.1, sigma=1, nu=0.1), from=0, add=TRUE, col="red") ## The random function hist(rCS2e(n=10000, mu=0.1, sigma=1, nu=0.1), freq=FALSE, xlab="x", las=1, main="") curve(dCS2e(x, mu=0.1, sigma=1, nu=0.1), from=0, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hCS2e(x, mu=1, sigma=0.1, nu =0.1), from=0, to=1, ylim=c(0, 10), col=2, ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function par(mfrow=c(1,1)) curve(dCS2e(x, mu=1, sigma=0.1, nu =0.1), from=0, to=1, ylim=c(0, 3), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pCS2e(x, mu=1, sigma=0.1, nu =0.1), from=0, to=1, col="red", las=1, ylab="F(x)") curve(pCS2e(x, mu=1, sigma=0.1, nu =0.1, lower.tail=FALSE), from=0, to=1, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qCS2e(p, mu=0.1, sigma=1, nu=0.1), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pCS2e(x, mu=0.1, sigma=1, nu=0.1), from=0, add=TRUE, col="red") ## The random function hist(rCS2e(n=10000, mu=0.1, sigma=1, nu=0.1), freq=FALSE, xlab="x", las=1, main="") curve(dCS2e(x, mu=0.1, sigma=1, nu=0.1), from=0, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hCS2e(x, mu=1, sigma=0.1, nu =0.1), from=0, to=1, ylim=c(0, 10), col=2, ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Extended Exponential Geometric distribution
with parameters mu
and sigma
.
dEEG(x, mu, sigma, log = FALSE) pEEG(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qEEG(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rEEG(n, mu, sigma) hEEG(x, mu, sigma)
dEEG(x, mu, sigma, log = FALSE) pEEG(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qEEG(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rEEG(n, mu, sigma) hEEG(x, mu, sigma)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Extended Exponential Geometric distribution with parameters mu
,
and sigma
has density given by
for ,
and
.
dEEG
gives the density, pEEG
gives the distribution
function, qEEG
gives the quantile function, rEEG
generates random deviates and hEEG
gives the hazard function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Adamidis K, Dimitrakopoulou T, Loukas S (2005). “On an extension of the exponential-geometric distribution.” Statistics & probability letters, 73(3), 259–269.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function par(mfrow=c(1,1)) curve(dEEG(x, mu = 1, sigma =3), from = 0, to = 10, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pEEG(x, mu = 1, sigma =3), from = 0, to = 10, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pEEG(x, mu = 1, sigma =3, lower.tail = FALSE), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qEEG(p = p, mu = 1, sigma =0.5), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pEEG(x, mu = 1, sigma =0.5), from = 0, add = TRUE, col = "red") ## The random function hist(rEEG(1000, mu = 1, sigma =1), freq = FALSE, xlab = "x", ylim = c(0, 0.9), las = 1, main = "") curve(dEEG(x, mu = 1, sigma =1), from = 0, add = TRUE, col = "red", ylim = c(0, 0.8)) ## The Hazard function par(mfrow=c(1,1)) curve(hEEG(x, mu = 1, sigma =0.5), from = 0, to = 2, col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function par(mfrow=c(1,1)) curve(dEEG(x, mu = 1, sigma =3), from = 0, to = 10, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pEEG(x, mu = 1, sigma =3), from = 0, to = 10, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pEEG(x, mu = 1, sigma =3, lower.tail = FALSE), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qEEG(p = p, mu = 1, sigma =0.5), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pEEG(x, mu = 1, sigma =0.5), from = 0, add = TRUE, col = "red") ## The random function hist(rEEG(1000, mu = 1, sigma =1), freq = FALSE, xlab = "x", ylim = c(0, 0.9), las = 1, main = "") curve(dEEG(x, mu = 1, sigma =1), from = 0, add = TRUE, col = "red", ylim = c(0, 0.8)) ## The Hazard function par(mfrow=c(1,1)) curve(hEEG(x, mu = 1, sigma =0.5), from = 0, to = 2, col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the four parameter Exponentiated Generalized Gamma distribution
with parameters mu
, sigma
, nu
and tau
.
dEGG(x, mu, sigma, nu, tau, log = FALSE) pEGG(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qEGG(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rEGG(n, mu, sigma, nu, tau) hEGG(x, mu, sigma, nu, tau)
dEGG(x, mu, sigma, nu, tau, log = FALSE) pEGG(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qEGG(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rEGG(n, mu, sigma, nu, tau) hEGG(x, mu, sigma, nu, tau)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
tau |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
Four-Parameter Exponentiated Generalized Gamma distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for x > 0.
dEGG
gives the density, pEGG
gives the distribution
function, qEGG
gives the quantile function, rEGG
generates random deviates and hEGG
gives the hazard function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Gauss M. C, Edwin M.M O, Giovana O. S (2011). “The exponentiated generalized gamma distribution with application to lifetime data.” Journal of Statistical Computation and Simulation, 81(7), 827–842. doi:10.1080/00949650903517874.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5), from=0.000001, to=1.5, ylim=c(0, 2.5), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5), from=0.000001, to=1.5, col="red", las=1, ylab="F(x)") curve(pEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5, lower.tail=FALSE), from=0.000001, to=1.5, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qEGG(p, mu=0.1, sigma=0.8, nu=10, tau=1.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5), from=0.00001, add=TRUE, col="red") ## The random function hist(rEGG(n=100, mu=0.1, sigma=0.8, nu=10, tau=1.5), freq=FALSE, xlab="x", las=1, main="") curve(dEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5), from=0.0001, to=2, add=TRUE, col="red") ## The Hazard function curve(hEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5), from=0.0001, to=1.5, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5), from=0.000001, to=1.5, ylim=c(0, 2.5), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5), from=0.000001, to=1.5, col="red", las=1, ylab="F(x)") curve(pEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5, lower.tail=FALSE), from=0.000001, to=1.5, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qEGG(p, mu=0.1, sigma=0.8, nu=10, tau=1.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5), from=0.00001, add=TRUE, col="red") ## The random function hist(rEGG(n=100, mu=0.1, sigma=0.8, nu=10, tau=1.5), freq=FALSE, xlab="x", las=1, main="") curve(dEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5), from=0.0001, to=2, add=TRUE, col="red") ## The Hazard function curve(hEGG(x, mu=0.1, sigma=0.8, nu=10, tau=1.5), from=0.0001, to=1.5, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Exponentiated Modifien Weibull Extension distribution
with parameters mu
, sigma
, nu
and tau
.
dEMWEx(x, mu, sigma, nu, tau, log = FALSE) pEMWEx(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qEMWEx(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rEMWEx(n, mu, sigma, nu, tau) hEMWEx(x, mu, sigma, nu, tau)
dEMWEx(x, mu, sigma, nu, tau, log = FALSE) pEMWEx(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qEMWEx(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rEMWEx(n, mu, sigma, nu, tau) hEMWEx(x, mu, sigma, nu, tau)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
tau |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Exponentiated Modifien Weibull Extension Distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for ,
,
,
and
.
dEMWEx
gives the density, pEMWEx
gives the distribution
function, qEMWEx
gives the quantile function, rEMWEx
generates random deviates and hEMWEx
gives the hazard function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Sarhan AM, Apaloo J (2013). “Exponentiated modified Weibull extension distribution.” Reliability Engineering & System Safety, 112, 137–144.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dEMWEx(x, mu = 49.046, sigma =3.148, nu=0.00005, tau=0.1), from=0, to=100, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pEMWEx(x, mu = (1/4), sigma =1, nu=1, tau=2), from = 0, to = 1, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pEMWEx(x, mu = (1/4), sigma =1, nu=1, tau=2, lower.tail = FALSE), from = 0, to = 1, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qEMWEx(p = p, mu = 49.046, sigma =3.148, nu=0.00005, tau=0.1), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pEMWEx(x, mu = 49.046, sigma =3.148, nu=0.00005, tau=0.1), from = 0, add = TRUE, col = "red") ## The random function hist(rEMWEx(1000, mu = (1/4), sigma =1, nu=1, tau=2), freq = FALSE, xlab = "x", las = 1, main = "") curve(dEMWEx(x, mu = (1/4), sigma =1, nu=1, tau=2), from = 0, add = TRUE, col = "red", ylim = c(0, 0.5)) ## The Hazard function( par(mfrow=c(1,1)) curve(hEMWEx(x, mu = 49.046, sigma =3.148, nu=0.00005, tau=0.1), from = 0, to = 80, col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dEMWEx(x, mu = 49.046, sigma =3.148, nu=0.00005, tau=0.1), from=0, to=100, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pEMWEx(x, mu = (1/4), sigma =1, nu=1, tau=2), from = 0, to = 1, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pEMWEx(x, mu = (1/4), sigma =1, nu=1, tau=2, lower.tail = FALSE), from = 0, to = 1, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qEMWEx(p = p, mu = 49.046, sigma =3.148, nu=0.00005, tau=0.1), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pEMWEx(x, mu = 49.046, sigma =3.148, nu=0.00005, tau=0.1), from = 0, add = TRUE, col = "red") ## The random function hist(rEMWEx(1000, mu = (1/4), sigma =1, nu=1, tau=2), freq = FALSE, xlab = "x", las = 1, main = "") curve(dEMWEx(x, mu = (1/4), sigma =1, nu=1, tau=2), from = 0, add = TRUE, col = "red", ylim = c(0, 0.5)) ## The Hazard function( par(mfrow=c(1,1)) curve(hEMWEx(x, mu = 49.046, sigma =3.148, nu=0.00005, tau=0.1), from = 0, to = 80, col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Extended Odd Fr?chet-Nadarajah-Haghighi distribution
with parameters mu
, sigma
, nu
and tau
.
dEOFNH(x, mu, sigma, nu, tau, log = FALSE) pEOFNH(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qEOFNH(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rEOFNH(n, mu, sigma, nu, tau) hEOFNH(x, mu, sigma, nu, tau)
dEOFNH(x, mu, sigma, nu, tau, log = FALSE) pEOFNH(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qEOFNH(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rEOFNH(n, mu, sigma, nu, tau) hEOFNH(x, mu, sigma, nu, tau)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
tau |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
Tthe Extended Odd Frechet-Nadarajah-Haghighi mu
,
sigma
, nu
and tau
has density given by
for ,
,
,
and
.
dEOFNH
gives the density, pEOFNH
gives the distribution
function, qEOFNH
gives the quantile function, rEOFNH
generates random numbers and hEOFNH
gives the hazard function.
Helber Santiago Padilla
Nasiru S (2018). “Extended Odd Fréchet-G Family of Distributions.” Journal of Probability and Statistics, 2018.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ##The probability density function par(mfrow=c(1,1)) curve(dEOFNH(x, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), from=0, to=10, ylim=c(0, 0.25), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pEOFNH(x,mu=18.5, sigma=5.1, nu=0.1, tau=0.1), from = 0, to = 10, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pEOFNH(x, mu=18.5, sigma=5.1, nu=0.1, tau=0.1, lower.tail = FALSE), from = 0, to = 10, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ##The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qEOFNH(p, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pEOFNH(x, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), from=0, add=TRUE, col="red") ##The random function hist(rEOFNH(n=10000, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), freq=FALSE, xlab="x", las=1, main="") curve(dEOFNH(x, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), from=0, add=TRUE, col="red", ylim=c(0,1.25)) ##The Hazard function par(mfrow=c(1,1)) curve(hEOFNH(x, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), from=0, to=10, ylim=c(0, 1), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ##The probability density function par(mfrow=c(1,1)) curve(dEOFNH(x, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), from=0, to=10, ylim=c(0, 0.25), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pEOFNH(x,mu=18.5, sigma=5.1, nu=0.1, tau=0.1), from = 0, to = 10, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pEOFNH(x, mu=18.5, sigma=5.1, nu=0.1, tau=0.1, lower.tail = FALSE), from = 0, to = 10, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ##The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qEOFNH(p, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pEOFNH(x, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), from=0, add=TRUE, col="red") ##The random function hist(rEOFNH(n=10000, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), freq=FALSE, xlab="x", las=1, main="") curve(dEOFNH(x, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), from=0, add=TRUE, col="red", ylim=c(0,1.25)) ##The Hazard function par(mfrow=c(1,1)) curve(hEOFNH(x, mu=18.5, sigma=5.1, nu=0.1, tau=0.1), from=0, to=10, ylim=c(0, 1), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the exponentiated Weibull distribution with
parameters mu
, sigma
and nu
.
dEW(x, mu, sigma, nu, log = FALSE) pEW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qEW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rEW(n, mu, sigma, nu) hEW(x, mu, sigma, nu)
dEW(x, mu, sigma, nu, log = FALSE) pEW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qEW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rEW(n, mu, sigma, nu) hEW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
scale parameter. |
sigma , nu
|
shape parameters. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Exponentiated Weibull Distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
dEW
gives the density, pEW
gives the distribution
function, qEW
gives the quantile function, rEW
generates random deviates and hEW
gives the hazard function.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dEW(x, mu=2, sigma=1.5, nu=0.5), from=0, to=2, ylim=c(0, 2.5), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pEW(x, mu=2, sigma=1.5, nu=0.5), from=0, to=2, col="red", las=1, ylab="F(x)") curve(pEW(x, mu=2, sigma=1.5, nu=0.5, lower.tail=FALSE), from=0, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qEW(p, mu=2, sigma=1.5, nu=0.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pEW(x, mu=2, sigma=1.5, nu=0.5), from=0, add=TRUE, col="red") ## The random function hist(rEW(n=10000, mu=2, sigma=1.5, nu=0.5), freq=FALSE, xlab="x", las=1, main="") curve(dEW(x, mu=2, sigma=1.5, nu=0.5), from=0, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hEW(x, mu=2, sigma=1.5, nu=0.5), from=0, to=2, ylim=c(0, 7), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dEW(x, mu=2, sigma=1.5, nu=0.5), from=0, to=2, ylim=c(0, 2.5), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pEW(x, mu=2, sigma=1.5, nu=0.5), from=0, to=2, col="red", las=1, ylab="F(x)") curve(pEW(x, mu=2, sigma=1.5, nu=0.5, lower.tail=FALSE), from=0, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qEW(p, mu=2, sigma=1.5, nu=0.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pEW(x, mu=2, sigma=1.5, nu=0.5), from=0, add=TRUE, col="red") ## The random function hist(rEW(n=10000, mu=2, sigma=1.5, nu=0.5), freq=FALSE, xlab="x", las=1, main="") curve(dEW(x, mu=2, sigma=1.5, nu=0.5), from=0, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hEW(x, mu=2, sigma=1.5, nu=0.5), from=0, to=2, ylim=c(0, 7), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the exponentiated XLindley distribution with
parameters mu
and sigma
.
dEXL(x, mu, sigma, log = FALSE) pEXL(q, mu, sigma, log.p = FALSE, lower.tail = TRUE) qEXL(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rEXL(n, mu, sigma) hEXL(x, mu, sigma, log = FALSE)
dEXL(x, mu, sigma, log = FALSE) pEXL(q, mu, sigma, log.p = FALSE, lower.tail = TRUE) qEXL(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rEXL(n, mu, sigma) hEXL(x, mu, sigma, log = FALSE)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The exponentiated XLindley with parameters mu
and sigma
has density given by
for ,
and
.
Note: In this implementation we changed the original parameters for
and
for
, we did it to implement this distribution
within gamlss framework.
dEXL
gives the density, pEXL
gives the distribution
function, qEXL
gives the quantile function, rEXL
generates random deviates and hEXL
gives the hazard function.
Manuel Gutierrez Tangarife, [email protected]
Alomair, A. M., Ahmed, M., Tariq, S., Ahsan-ul-Haq, M., & Talib, J. (2024). An exponentiated XLindley distribution with properties, inference and applications. Heliyon, 10(3).
dEXL.
#Example 1 #Plotting the mass function for different parameter values curve(dEXL(x, mu=0.5, sigma=0.5), from=0.001, to=5, ylim=c(0, 1), col="royalblue1", lwd=2, main="Density function", xlab="x", ylab="f(x)") curve(dEXL(x, mu=1, sigma=0.5), col="tomato", lwd=2, add=TRUE) curve(dEXL(x, mu=1.5, sigma=0.5), col="seagreen", lwd=2, add=TRUE) legend("topright", legend=c("mu=0.5, sigma=0.5", "mu=1.0, sigma=0.5", "mu=1.5, sigma=0.5"), col=c("royalblue1", "tomato", "seagreen"), lwd=2, cex=0.6) curve(dEXL(x, mu=0.5, sigma=1), from=0.001, to=5, ylim=c(0, 1), col="royalblue1", lwd=2, main="Density function", xlab="x", ylab="f(x)") curve(dEXL(x, mu=1, sigma=1), col="tomato", lwd=2, add=TRUE) curve(dEXL(x, mu=1.5, sigma=1), col="seagreen", lwd=2, add=TRUE) legend("topright", legend=c("mu=0.5, sigma=1", "mu=1.0, sigma=1", "mu=1.5, sigma=1"), col=c("royalblue1", "tomato", "seagreen"), lwd=2, cex=0.6) curve(dEXL(x, mu=0.5, sigma=1.5), from=0.001, to=8, ylim=c(0, 1), col="royalblue1", lwd=2, main="Density function", xlab="x", ylab="f(x)") curve(dEXL(x, mu=1, sigma=1.5), col="tomato", lwd=2, add=TRUE) curve(dEXL(x, mu=1.5, sigma=1.5), col="seagreen", lwd=2, add=TRUE) legend("topright", legend=c("mu=0.5, sigma=1.5", "mu=1.0, sigma=1.5", "mu=1.5, sigma=1.5"), col=c("royalblue1", "tomato", "seagreen"), lwd=2, cex=0.6) # Example 2 # Checking if the cumulative curves converge to 1 curve(pEXL(x, mu=0.5, sigma=0.5), from=0.001, to=5, ylim=c(0, 1), col="royalblue1", lwd=2, main="Cumulative Distribution Function", xlab="x", ylab="f(x)") curve(pEXL(x, mu=1, sigma=0.5), col="tomato", lwd=2, add=TRUE) curve(pEXL(x, mu=1.5, sigma=0.5), col="seagreen", lwd=2, add=TRUE) legend("bottomright", legend=c("mu=0.5, sigma=0.5", "mu=1.0, sigma=0.5", "mu=1.5, sigma=0.5"), col=c("royalblue1", "tomato", "seagreen"), lwd=2, cex=0.5) curve(pEXL(x, mu=0.5, sigma=0.5, lower.tail=FALSE), from=0.001, to=5, ylim=c(0, 1), col="royalblue1", lwd=2, main="Cumulative Distribution Function", xlab="x", ylab="f(x)") curve(pEXL(x, mu=1, sigma=0.5, lower.tail=FALSE), col="tomato", lwd=2, add=TRUE) curve(pEXL(x, mu=1.5, sigma=0.5, lower.tail=FALSE), col="seagreen", lwd=2, add=TRUE) legend("topright", legend=c("mu=0.5, sigma=0.5", "mu=1.0, sigma=0.5", "mu=1.5, sigma=0.5"), col=c("royalblue1", "tomato", "seagreen"), lwd=2, cex=0.5) #example 3 ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qEXL(p, mu=2.3, sigma=1.7), y=p, xlab="Quantile", las=1, ylab="Probability", main="Quantile function ") curve(pEXL(x, mu=2.3, sigma=1.7), from=0, add=TRUE, col="tomato", lwd=2.5) #some values p <- c(0.25, 0.5, 0.75) quantile <- qEXL(p=p, mu=2.3, sigma=1.7) for(i in quantile){ print(integrate(dEXL, lower=0, upper=i, mu=2.3, sigma=1.7)) } #example 4 ## The random function x <- rEXL(n=10000, mu=1.5, sigma=2.5) hist(x, freq=FALSE) curve(dEXL(x, mu=1.5, sigma=2.5), from=0, to=20, add=TRUE, col="tomato", lwd=2) #example 5 ## The Hazard function curve(hEXL(x, mu=1.5, sigma=2), from=0.001, to=4, col="tomato", ylab="Hazard function", las=1)
#Example 1 #Plotting the mass function for different parameter values curve(dEXL(x, mu=0.5, sigma=0.5), from=0.001, to=5, ylim=c(0, 1), col="royalblue1", lwd=2, main="Density function", xlab="x", ylab="f(x)") curve(dEXL(x, mu=1, sigma=0.5), col="tomato", lwd=2, add=TRUE) curve(dEXL(x, mu=1.5, sigma=0.5), col="seagreen", lwd=2, add=TRUE) legend("topright", legend=c("mu=0.5, sigma=0.5", "mu=1.0, sigma=0.5", "mu=1.5, sigma=0.5"), col=c("royalblue1", "tomato", "seagreen"), lwd=2, cex=0.6) curve(dEXL(x, mu=0.5, sigma=1), from=0.001, to=5, ylim=c(0, 1), col="royalblue1", lwd=2, main="Density function", xlab="x", ylab="f(x)") curve(dEXL(x, mu=1, sigma=1), col="tomato", lwd=2, add=TRUE) curve(dEXL(x, mu=1.5, sigma=1), col="seagreen", lwd=2, add=TRUE) legend("topright", legend=c("mu=0.5, sigma=1", "mu=1.0, sigma=1", "mu=1.5, sigma=1"), col=c("royalblue1", "tomato", "seagreen"), lwd=2, cex=0.6) curve(dEXL(x, mu=0.5, sigma=1.5), from=0.001, to=8, ylim=c(0, 1), col="royalblue1", lwd=2, main="Density function", xlab="x", ylab="f(x)") curve(dEXL(x, mu=1, sigma=1.5), col="tomato", lwd=2, add=TRUE) curve(dEXL(x, mu=1.5, sigma=1.5), col="seagreen", lwd=2, add=TRUE) legend("topright", legend=c("mu=0.5, sigma=1.5", "mu=1.0, sigma=1.5", "mu=1.5, sigma=1.5"), col=c("royalblue1", "tomato", "seagreen"), lwd=2, cex=0.6) # Example 2 # Checking if the cumulative curves converge to 1 curve(pEXL(x, mu=0.5, sigma=0.5), from=0.001, to=5, ylim=c(0, 1), col="royalblue1", lwd=2, main="Cumulative Distribution Function", xlab="x", ylab="f(x)") curve(pEXL(x, mu=1, sigma=0.5), col="tomato", lwd=2, add=TRUE) curve(pEXL(x, mu=1.5, sigma=0.5), col="seagreen", lwd=2, add=TRUE) legend("bottomright", legend=c("mu=0.5, sigma=0.5", "mu=1.0, sigma=0.5", "mu=1.5, sigma=0.5"), col=c("royalblue1", "tomato", "seagreen"), lwd=2, cex=0.5) curve(pEXL(x, mu=0.5, sigma=0.5, lower.tail=FALSE), from=0.001, to=5, ylim=c(0, 1), col="royalblue1", lwd=2, main="Cumulative Distribution Function", xlab="x", ylab="f(x)") curve(pEXL(x, mu=1, sigma=0.5, lower.tail=FALSE), col="tomato", lwd=2, add=TRUE) curve(pEXL(x, mu=1.5, sigma=0.5, lower.tail=FALSE), col="seagreen", lwd=2, add=TRUE) legend("topright", legend=c("mu=0.5, sigma=0.5", "mu=1.0, sigma=0.5", "mu=1.5, sigma=0.5"), col=c("royalblue1", "tomato", "seagreen"), lwd=2, cex=0.5) #example 3 ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qEXL(p, mu=2.3, sigma=1.7), y=p, xlab="Quantile", las=1, ylab="Probability", main="Quantile function ") curve(pEXL(x, mu=2.3, sigma=1.7), from=0, add=TRUE, col="tomato", lwd=2.5) #some values p <- c(0.25, 0.5, 0.75) quantile <- qEXL(p=p, mu=2.3, sigma=1.7) for(i in quantile){ print(integrate(dEXL, lower=0, upper=i, mu=2.3, sigma=1.7)) } #example 4 ## The random function x <- rEXL(n=10000, mu=1.5, sigma=2.5) hist(x, freq=FALSE) curve(dEXL(x, mu=1.5, sigma=2.5), from=0, to=20, add=TRUE, col="tomato", lwd=2) #example 5 ## The Hazard function curve(hEXL(x, mu=1.5, sigma=2), from=0.001, to=4, col="tomato", ylab="Hazard function", las=1)
Density, distribution function, quantile function,
random generation and hazard function for the Extended Weibull distribution
with parameters mu
, sigma
and nu
.
dExW(x, mu, sigma, nu, log = FALSE) pExW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qExW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rExW(n, mu, sigma, nu) hExW(x, mu, sigma, nu)
dExW(x, mu, sigma, nu, log = FALSE) pExW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qExW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rExW(n, mu, sigma, nu) hExW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Extended Weibull distribution with parameters mu
,
sigma
and nu
has density given by
for x > 0.
dExW
gives the density, pExW
gives the distribution
function, qExW
gives the quantile function, rExW
generates random deviates and hExW
gives the hazard function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Tieling Z, Min X (2007). “Failure Data Analysis with Extended Weibull Distribution.” Communications in Statistics - Simulation and Computation, 36, 579–592. doi:10.1080/03610910701236081.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dExW(x, mu=0.3, sigma=2, nu=0.05), from=0.0001, to=2, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pExW(x, mu=0.3, sigma=2, nu=0.05), from=0.0001, to=2, col="red", las=1, ylab="F(x)") curve(pExW(x, mu=0.3, sigma=2, nu=0.05, lower.tail=FALSE), from=0.0001, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qExW(p, mu=0.3, sigma=2, nu=0.05), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pExW(x, mu=0.3, sigma=2, nu=0.05), from=0, add=TRUE, col="red") ## The random function hist(rExW(n=10000, mu=0.3, sigma=2, nu=0.05), freq=FALSE, xlab="x", ylim=c(0, 2), las=1, main="") curve(dExW(x, mu=0.3, sigma=2, nu=0.05), from=0.001, to=4, add=TRUE, col="red") ## The Hazard function curve(hExW(x, mu=0.3, sigma=2, nu=0.05), from=0.001, to=4, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dExW(x, mu=0.3, sigma=2, nu=0.05), from=0.0001, to=2, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pExW(x, mu=0.3, sigma=2, nu=0.05), from=0.0001, to=2, col="red", las=1, ylab="F(x)") curve(pExW(x, mu=0.3, sigma=2, nu=0.05, lower.tail=FALSE), from=0.0001, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qExW(p, mu=0.3, sigma=2, nu=0.05), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pExW(x, mu=0.3, sigma=2, nu=0.05), from=0, add=TRUE, col="red") ## The random function hist(rExW(n=10000, mu=0.3, sigma=2, nu=0.05), freq=FALSE, xlab="x", ylim=c(0, 2), las=1, main="") curve(dExW(x, mu=0.3, sigma=2, nu=0.05), from=0.001, to=4, add=TRUE, col="red") ## The Hazard function curve(hExW(x, mu=0.3, sigma=2, nu=0.05), from=0.001, to=4, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Flexible Weibull Extension distribution with
parameters mu
and sigma
.
dFWE(x, mu, sigma, log = FALSE) pFWE(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qFWE(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rFWE(n, mu, sigma) hFWE(x, mu, sigma)
dFWE(x, mu, sigma, log = FALSE) pFWE(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qFWE(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rFWE(n, mu, sigma) hFWE(x, mu, sigma)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Flexible Weibull extension with parameters mu
and sigma
has density given by
for x>0.
dFWE
gives the density, pFWE
gives the distribution
function, qFWE
gives the quantile function, rFWE
generates random deviates and hFWE
gives the hazard function.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dFWE(x, mu=0.75, sigma=0.5), from=0, to=3, ylim=c(0, 1.7), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pFWE(x, mu=0.75, sigma=0.5), from=0, to=3, col="red", las=1, ylab="F(x)") curve(pFWE(x, mu=0.75, sigma=0.5, lower.tail=FALSE), from=0, to=3, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qFWE(p, mu=0.75, sigma=0.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pFWE(x, mu=0.75, sigma=0.5), from=0, add=TRUE, col="red") ## The random function hist(rFWE(n=1000, mu=2, sigma=0.5), freq=FALSE, xlab="x", ylim=c(0, 2), las=1, main="") curve(dFWE(x, mu=2, sigma=0.5), from=0, to=3, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hFWE(x, mu=0.75, sigma=0.5), from=0, to=2, ylim=c(0, 2.5), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dFWE(x, mu=0.75, sigma=0.5), from=0, to=3, ylim=c(0, 1.7), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pFWE(x, mu=0.75, sigma=0.5), from=0, to=3, col="red", las=1, ylab="F(x)") curve(pFWE(x, mu=0.75, sigma=0.5, lower.tail=FALSE), from=0, to=3, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qFWE(p, mu=0.75, sigma=0.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pFWE(x, mu=0.75, sigma=0.5), from=0, add=TRUE, col="red") ## The random function hist(rFWE(n=1000, mu=2, sigma=0.5), freq=FALSE, xlab="x", ylim=c(0, 2), las=1, main="") curve(dFWE(x, mu=2, sigma=0.5), from=0, to=3, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hFWE(x, mu=0.75, sigma=0.5), from=0, to=2, ylim=c(0, 2.5), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Gamma Weibull distribution
with parameters mu
, sigma
, nu
and tau
.
dGammaW(x, mu, sigma, nu, log = FALSE) pGammaW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qGammaW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rGammaW(n, mu, sigma, nu) hGammaW(x, mu, sigma, nu)
dGammaW(x, mu, sigma, nu, log = FALSE) pGammaW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qGammaW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rGammaW(n, mu, sigma, nu) hGammaW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Gamma Weibull Distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
dGammaW
gives the density, pGammaW
gives the distribution
function, qGammaW
gives the quantile function, rGammaW
generates random deviates and hGammaW
gives the hazard function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Stacy EW, others (1962). “A generalization of the gamma distribution.” The Annals of mathematical statistics, 33(3), 1187–1192.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dGammaW(x, mu = 0.5, sigma = 2, nu=1), from = 0, to = 6, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pGammaW(x, mu = 0.5, sigma = 2, nu=1), from = 0, to = 3, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pGammaW(x, mu = 0.5, sigma = 2, nu=1, lower.tail = FALSE), from = 0, to = 3, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qGammaW(p = p, mu = 0.5, sigma = 2, nu=1), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pGammaW(x, mu = 0.5, sigma = 2, nu=1), from = 0, add = TRUE, col = "red") ## The random function hist(rGammaW(1000, mu = 0.5, sigma = 2, nu=1), freq = FALSE, xlab = "x", ylim = c(0, 1), las = 1, main = "") curve(dGammaW(x, mu = 0.5, sigma = 2, nu=1), from = 0, add = TRUE, col = "red", ylim = c(0, 1)) ## The Hazard function par(mfrow=c(1,1)) curve(hGammaW(x, mu = 0.5, sigma = 2, nu=1), from = 0, to = 2, ylim = c(0, 1), col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dGammaW(x, mu = 0.5, sigma = 2, nu=1), from = 0, to = 6, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pGammaW(x, mu = 0.5, sigma = 2, nu=1), from = 0, to = 3, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pGammaW(x, mu = 0.5, sigma = 2, nu=1, lower.tail = FALSE), from = 0, to = 3, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qGammaW(p = p, mu = 0.5, sigma = 2, nu=1), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pGammaW(x, mu = 0.5, sigma = 2, nu=1), from = 0, add = TRUE, col = "red") ## The random function hist(rGammaW(1000, mu = 0.5, sigma = 2, nu=1), freq = FALSE, xlab = "x", ylim = c(0, 1), las = 1, main = "") curve(dGammaW(x, mu = 0.5, sigma = 2, nu=1), from = 0, add = TRUE, col = "red", ylim = c(0, 1)) ## The Hazard function par(mfrow=c(1,1)) curve(hGammaW(x, mu = 0.5, sigma = 2, nu=1), from = 0, to = 2, ylim = c(0, 1), col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the generalized Gompertz distribution with
parameters mu
sigma
and nu
.
dGGD(x, mu, sigma, nu, log = FALSE) pGGD(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qGGD(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rGGD(n, mu, sigma, nu) hGGD(x, mu, sigma, nu)
dGGD(x, mu, sigma, nu, log = FALSE) pGGD(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qGGD(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rGGD(n, mu, sigma, nu) hGGD(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu , nu
|
scale parameter. |
sigma |
shape parameters. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Generalized Gompertz Distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
dGGD
gives the density, pGGD
gives the distribution
function, qGGD
gives the quantile function, rGGD
generates random deviates and hGGD
gives the hazard function.
Johan David Marin Benjumea, [email protected]
El-Gohary A, Alshamrani A, Al-Otaibi AN (2013). “The generalized Gompertz distribution.” Applied Mathematical Modelling, 37(1-2), 13–24.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function par(mfrow = c(1, 1)) curve(dGGD(x, mu=1, sigma=0.3, nu=1.5), from = 0, to = 4, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pGGD(x, mu=1, sigma=0.3, nu=1.5), from = 0, to = 4, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pGGD(x, mu=1, sigma=0.3, nu=1.5, lower.tail = FALSE), from = 0, to = 4, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qGGD(p=p, mu=1, sigma=0.3, nu=1.5), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pGGD(x, mu=1, sigma=0.3, nu=1.5), from = 0, add = TRUE, col = "red") ## The random function hist(rGGD(1000, mu=1, sigma=0.3, nu=1.5), freq = FALSE, xlab = "x", las = 1, ylim = c(0, 0.7), main = "") curve(dGGD(x,mu=1, sigma=0.3, nu=1.5), from = 0, to =8, add = TRUE, col = "red") ## The Hazard function par(mfrow=c(1,1)) curve(hGGD(x, mu=1, sigma=0.3, nu=1.5), from = 0, to = 3, col = "red", ylab = "The hazard function", las = 1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function par(mfrow = c(1, 1)) curve(dGGD(x, mu=1, sigma=0.3, nu=1.5), from = 0, to = 4, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pGGD(x, mu=1, sigma=0.3, nu=1.5), from = 0, to = 4, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pGGD(x, mu=1, sigma=0.3, nu=1.5, lower.tail = FALSE), from = 0, to = 4, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qGGD(p=p, mu=1, sigma=0.3, nu=1.5), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pGGD(x, mu=1, sigma=0.3, nu=1.5), from = 0, add = TRUE, col = "red") ## The random function hist(rGGD(1000, mu=1, sigma=0.3, nu=1.5), freq = FALSE, xlab = "x", las = 1, ylim = c(0, 0.7), main = "") curve(dGGD(x,mu=1, sigma=0.3, nu=1.5), from = 0, to =8, add = TRUE, col = "red") ## The Hazard function par(mfrow=c(1,1)) curve(hGGD(x, mu=1, sigma=0.3, nu=1.5), from = 0, to = 3, col = "red", ylab = "The hazard function", las = 1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Generalized Inverse Weibull distribution
with parameters mu
, sigma
and nu
.
dGIW(x, mu, sigma, nu, log = FALSE) pGIW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qGIW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rGIW(n, mu, sigma, nu) hGIW(x, mu, sigma, nu)
dGIW(x, mu, sigma, nu, log = FALSE) pGIW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qGIW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rGIW(n, mu, sigma, nu) hGIW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Generalized Inverse Weibull distribution mu
,
sigma
and nu
has density given by
for x > 0.
dGIW
gives the density, pGIW
gives the distribution
function, qGIW
gives the quantile function, rGIW
generates random deviates and hGIW
gives the hazard function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Felipe R SdG, Edwin M MO, Gauss M C (2009). “The generalized inverse Weibull distribution.” Statistical papers, 52(3), 591–619. doi:10.1007/s00362-009-0271-3.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dGIW(x, mu=3, sigma=5, nu=0.5), from=0.001, to=8, col="red", ylab="f(x)", las=1) ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pGIW(x, mu=3, sigma=5, nu=0.5), from=0.0001, to=14, col="red", las=1, ylab="F(x)") curve(pGIW(x, mu=3, sigma=5, nu=0.5, lower.tail=FALSE), from=0.0001, to=14, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qGIW(p, mu=3, sigma=5, nu=0.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pGIW(x, mu=3, sigma=5, nu=0.5), from=0, add=TRUE, col="red") ## The random function hist(rGIW(n=1000, mu=3, sigma=5, nu=0.5), freq=FALSE, xlab="x", ylim=c(0, 0.8), las=1, main="") curve(dGIW(x, mu=3, sigma=5, nu=0.5), from=0.001, to=14, add=TRUE, col="red") ## The Hazard function curve(hGIW(x, mu=3, sigma=5, nu=0.5), from=0.001, to=30, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dGIW(x, mu=3, sigma=5, nu=0.5), from=0.001, to=8, col="red", ylab="f(x)", las=1) ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pGIW(x, mu=3, sigma=5, nu=0.5), from=0.0001, to=14, col="red", las=1, ylab="F(x)") curve(pGIW(x, mu=3, sigma=5, nu=0.5, lower.tail=FALSE), from=0.0001, to=14, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qGIW(p, mu=3, sigma=5, nu=0.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pGIW(x, mu=3, sigma=5, nu=0.5), from=0, add=TRUE, col="red") ## The random function hist(rGIW(n=1000, mu=3, sigma=5, nu=0.5), freq=FALSE, xlab="x", ylim=c(0, 0.8), las=1, main="") curve(dGIW(x, mu=3, sigma=5, nu=0.5), from=0.001, to=14, add=TRUE, col="red") ## The Hazard function curve(hGIW(x, mu=3, sigma=5, nu=0.5), from=0.001, to=30, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the generalized
modified weibull distribution with parameters mu
,
sigma
, nu
and tau
.
dGMW(x, mu, sigma, nu, tau, log = FALSE) pGMW(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qGMW(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rGMW(n, mu, sigma, nu, tau) hGMW(x, mu, sigma, nu, tau, log = FALSE)
dGMW(x, mu, sigma, nu, tau, log = FALSE) pGMW(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qGMW(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rGMW(n, mu, sigma, nu, tau) hGMW(x, mu, sigma, nu, tau, log = FALSE)
x , q
|
vector of quantiles. |
mu |
scale parameter. |
sigma |
shape parameter. |
nu |
shape parameter. |
tau |
acceleration parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The generalized modified weibull with parameters mu
,
sigma
, nu
and tau
has density given by
for x>0.
dGMW
gives the density, pGMW
gives the distribution
function, qGMW
gives the quantile function, rGMW
generates random deviates and hGMW
gives the hazard function.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5), from=0, to=0.8, ylim=c(0, 2), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5), from=0, to=1.2, col="red", las=1, ylab="F(x)") curve(pGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5, lower.tail=FALSE), from=0, to=1.2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qGMW(p, mu=2, sigma=0.5, nu=2, tau=1.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5), from=0, add=TRUE, col="red") ## The random function hist(rGMW(n=1000, mu=2, sigma=0.5, nu=2,tau=1.5), freq=FALSE, xlab="x", main ="", las=1) curve(dGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5), from=0, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5), from=0, to=1, ylim=c(0, 16), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5), from=0, to=0.8, ylim=c(0, 2), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5), from=0, to=1.2, col="red", las=1, ylab="F(x)") curve(pGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5, lower.tail=FALSE), from=0, to=1.2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qGMW(p, mu=2, sigma=0.5, nu=2, tau=1.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5), from=0, add=TRUE, col="red") ## The random function hist(rGMW(n=1000, mu=2, sigma=0.5, nu=2,tau=1.5), freq=FALSE, xlab="x", main ="", las=1) curve(dGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5), from=0, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hGMW(x, mu=2, sigma=0.5, nu=2, tau=1.5), from=0, to=1, ylim=c(0, 16), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function, random generation and
hazard function for the generalized Weibull distribution with parameters
mu
, sigma
and nu
.
dGWF(x, mu, sigma, nu, log = FALSE) pGWF(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qGWF(p, mu, sigma, nu) rGWF(n, mu, sigma, nu) hGWF(x, mu, sigma, nu)
dGWF(x, mu, sigma, nu, log = FALSE) pGWF(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qGWF(p, mu, sigma, nu) rGWF(n, mu, sigma, nu) hGWF(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter one. |
sigma |
parameter two. |
nu |
parameter three. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[T <= t], otherwise, P[T > t]. |
p |
vector of probabilities. |
n |
number of observations. |
The generalized Weibull with parameters mu
, sigma
and
nu
has density given by
for ,
,
and
.
dGWF
gives the density, pGWF
gives the distribution
function, qGWF
gives the quantile function, rGWF
generates random deviates and hGWF
gives the hazard function.
Jaime Mosquera, [email protected]
Mudholkar, G. S., & Kollia, G. D. (1994). Generalized Weibull family: a structural analysis. Communications in statistics-theory and methods, 23(4), 1149-1171.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve( dGWF(x, mu = 5, sigma = 2, nu = -0.2), from = 0, to = 5, col = "red", las = 1, ylab = "f(x)" ) ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve( pGWF(x, mu = 5, sigma = 2, nu = -0.2), from = 0, to = 5, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)" ) curve( pGWF( x, mu = 5, sigma = 2, nu = -0.2, lower.tail = FALSE ), from = 0, to = 5, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)" ) ## The quantile function p <- seq(from = 0, to = 0.999, length.out = 100) plot( x = qGWF(p, mu = 5, sigma = 2, nu = -0.2), y = p, xlab = "Quantile", las = 1, ylab = "Probability" ) curve( pGWF(x, mu = 5, sigma = 2, nu = -0.2), from = 0, add = TRUE, col = "red" ) ## The random function hist( rGWF(n = 10000, mu = 5, sigma = 2, nu = -0.2), freq = FALSE, xlab = "x", las = 1, main = "", ylim = c(0, 2.0) ) curve(dGWF(x, mu = 5, sigma = 2, nu = -0.2), from = 0, add = TRUE, col = "red" ) ## The Hazard function par(mfrow = c(1, 1)) curve( hGWF(x, mu = 0.003, sigma = 5e-6, nu = 0.025), from = 0, to = 250, col = "red", ylab = "Hazard function", las = 1 ) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve( dGWF(x, mu = 5, sigma = 2, nu = -0.2), from = 0, to = 5, col = "red", las = 1, ylab = "f(x)" ) ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve( pGWF(x, mu = 5, sigma = 2, nu = -0.2), from = 0, to = 5, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)" ) curve( pGWF( x, mu = 5, sigma = 2, nu = -0.2, lower.tail = FALSE ), from = 0, to = 5, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)" ) ## The quantile function p <- seq(from = 0, to = 0.999, length.out = 100) plot( x = qGWF(p, mu = 5, sigma = 2, nu = -0.2), y = p, xlab = "Quantile", las = 1, ylab = "Probability" ) curve( pGWF(x, mu = 5, sigma = 2, nu = -0.2), from = 0, add = TRUE, col = "red" ) ## The random function hist( rGWF(n = 10000, mu = 5, sigma = 2, nu = -0.2), freq = FALSE, xlab = "x", las = 1, main = "", ylim = c(0, 2.0) ) curve(dGWF(x, mu = 5, sigma = 2, nu = -0.2), from = 0, add = TRUE, col = "red" ) ## The Hazard function par(mfrow = c(1, 1)) curve( hGWF(x, mu = 0.003, sigma = 5e-6, nu = 0.025), from = 0, to = 250, col = "red", ylab = "Hazard function", las = 1 ) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the inverse weibull distribution with
parameters mu
and sigma
.
dIW(x, mu, sigma, log = FALSE) pIW(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qIW(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rIW(n, mu, sigma) hIW(x, mu, sigma)
dIW(x, mu, sigma, log = FALSE) pIW(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qIW(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rIW(n, mu, sigma) hIW(x, mu, sigma)
x , q
|
vector of quantiles. |
mu |
scale parameter. |
sigma |
shape parameters. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The inverse weibull distribution with parameters mu
and
sigma
has density given by
for ,
and
dIW
gives the density, pIW
gives the distribution
function, qIW
gives the quantile function, rIW
generates random deviates and hIW
gives the hazard function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Drapella A (1993). “The complementary Weibull distribution: unknown or just forgotten?” Quality and Reliability Engineering International, 9(4), 383–385.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dIW(x, mu=5, sigma=2.5), from=0, to=10, ylim=c(0, 0.55), col="red", las=1, ylab="f(x)") #' ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pIW(x, mu=5, sigma=2.5), from=0, to=10, col="red", las=1, ylab="F(x)") curve(pIW(x, mu=5, sigma=2.5, lower.tail=FALSE), from=0, to=10, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qIW(p, mu=5, sigma=2.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pIW(x, mu=5, sigma=2.5), from=0, add=TRUE, col="red") ## The random function hist(rIW(n=10000, mu=5, sigma=2.5), freq=FALSE, xlim=c(0,60), xlab="x", las=1, main="") curve(dIW(x, mu=5, sigma=2.5), from=0, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hIW(x, mu=5, sigma=2.5), from=0, to=15, ylim=c(0, 0.9), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dIW(x, mu=5, sigma=2.5), from=0, to=10, ylim=c(0, 0.55), col="red", las=1, ylab="f(x)") #' ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pIW(x, mu=5, sigma=2.5), from=0, to=10, col="red", las=1, ylab="F(x)") curve(pIW(x, mu=5, sigma=2.5, lower.tail=FALSE), from=0, to=10, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qIW(p, mu=5, sigma=2.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pIW(x, mu=5, sigma=2.5), from=0, add=TRUE, col="red") ## The random function hist(rIW(n=10000, mu=5, sigma=2.5), freq=FALSE, xlim=c(0,60), xlab="x", las=1, main="") curve(dIW(x, mu=5, sigma=2.5), from=0, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hIW(x, mu=5, sigma=2.5), from=0, to=15, ylim=c(0, 0.9), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Kumaraswamy Inverse Weibull distribution
with parameters mu
, sigma
and nu
.
dKumIW(x, mu, sigma, nu, log = FALSE) pKumIW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qKumIW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rKumIW(n, mu, sigma, nu) hKumIW(x, mu, sigma, nu)
dKumIW(x, mu, sigma, nu, log = FALSE) pKumIW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qKumIW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rKumIW(n, mu, sigma, nu) hKumIW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Kumaraswamy Inverse Weibull Distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
dKumIW
gives the density, pKumIW
gives the distribution
function, qKumIW
gives the quantile function, rKumIW
generates random deviates and hKumIW
gives the hazard function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Shahbaz MQ, Shahbaz S, Butt NS (2012). “The Kumaraswamy-Inverse Weibull Distribution.” Shahbaz, MQ, Shahbaz, S., & Butt, NS (2012). The Kumaraswamy–Inverse Weibull Distribution. Pakistan journal of statistics and operation research, 8(3), 479–489.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function par(mfrow = c(1, 1)) curve(dKumIW(x, mu = 1.5, sigma= 1.5, nu = 1), from = 0, to = 8.5, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pKumIW(x, mu = 1.5, sigma= 1.5, nu = 1), from = 0, to = 8.5, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pKumIW(x, mu = 1.5, sigma= 1.5, nu = 1, lower.tail = FALSE), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qKumIW(p=p, mu = 1.5, sigma= 1.5, nu = 10), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pKumIW(x, mu = 1.5, sigma= 1.5, nu = 10), from = 0, add = TRUE, col = "red") ## The random function hist(rKumIW(1000, mu = 1.5, sigma= 1.5, nu = 5), freq = FALSE, xlab = "x", las = 1, ylim = c(0, 1.5), main = "") curve(dKumIW(x, mu = 1.5, sigma= 1.5, nu = 5), from = 0, to =8, add = TRUE, col = "red") ## The Hazard function par(mfrow=c(1,1)) curve(hKumIW(x, mu = 1.5, sigma= 1.5, nu = 1), from = 0, to = 3, ylim = c(0, 0.7), col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function par(mfrow = c(1, 1)) curve(dKumIW(x, mu = 1.5, sigma= 1.5, nu = 1), from = 0, to = 8.5, col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pKumIW(x, mu = 1.5, sigma= 1.5, nu = 1), from = 0, to = 8.5, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pKumIW(x, mu = 1.5, sigma= 1.5, nu = 1, lower.tail = FALSE), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qKumIW(p=p, mu = 1.5, sigma= 1.5, nu = 10), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pKumIW(x, mu = 1.5, sigma= 1.5, nu = 10), from = 0, add = TRUE, col = "red") ## The random function hist(rKumIW(1000, mu = 1.5, sigma= 1.5, nu = 5), freq = FALSE, xlab = "x", las = 1, ylim = c(0, 1.5), main = "") curve(dKumIW(x, mu = 1.5, sigma= 1.5, nu = 5), from = 0, to =8, add = TRUE, col = "red") ## The Hazard function par(mfrow=c(1,1)) curve(hKumIW(x, mu = 1.5, sigma= 1.5, nu = 1), from = 0, to = 3, ylim = c(0, 0.7), col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Lindley distribution
with parameter mu
.
dLIN(x, mu, log = FALSE) pLIN(q, mu, lower.tail = TRUE, log.p = FALSE) qLIN(p, mu, lower.tail = TRUE, log.p = FALSE) rLIN(n, mu) hLIN(x, mu, log = FALSE)
dLIN(x, mu, log = FALSE) pLIN(q, mu, lower.tail = TRUE, log.p = FALSE) qLIN(p, mu, lower.tail = TRUE, log.p = FALSE) rLIN(n, mu) hLIN(x, mu, log = FALSE)
x , q
|
vector of quantiles. |
mu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
Lindley Distribution with parameter mu
has density given by
for x > 0 and . These function were taken form LindleyR package.
dLIN
gives the density, pLIN
gives the distribution
function, qLIN
gives the quantile function, rLIN
generates random deviates and hLIN
gives the hazard function.
Freddy Hernandez, [email protected]
Lindley DV (1958). “Fiducial distributions and Bayes' theorem.” Journal of the Royal Statistical Society. Series B (Methodological), 102–107.
Lindley DV (1965). Introduction to probability and statistics: from a Bayesian viewpoint. 2. Inference. CUP Archive.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dLIN(x, mu=1.5), from=0.0001, to=10, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pLIN(x, mu=2), from=0.0001, to=10, col="red", las=1, ylab="F(x)") curve(pLIN(x, mu=2, lower.tail=FALSE), from=0.0001, to=10, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qLIN(p, mu=2), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pLIN(x, mu=2), from=0, add=TRUE, col="red") ## The random function hist(rLIN(n=10000, mu=2), freq=FALSE, xlab="x", las=1, main="") curve(dLIN(x, mu=2), from=0.09, to=5, add=TRUE, col="red") ## The Hazard function curve(hLIN(x, mu=2), from=0.001, to=10, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dLIN(x, mu=1.5), from=0.0001, to=10, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pLIN(x, mu=2), from=0.0001, to=10, col="red", las=1, ylab="F(x)") curve(pLIN(x, mu=2, lower.tail=FALSE), from=0.0001, to=10, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qLIN(p, mu=2), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pLIN(x, mu=2), from=0, add=TRUE, col="red") ## The random function hist(rLIN(n=10000, mu=2), freq=FALSE, xlab="x", las=1, main="") curve(dLIN(x, mu=2), from=0.09, to=5, add=TRUE, col="red") ## The Hazard function curve(hLIN(x, mu=2), from=0.001, to=10, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Log-Weibull distribution
with parameters mu
and sigma
.
dLW(x, mu, sigma, log = FALSE) pLW(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qLW(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rLW(n, mu, sigma) hLW(x, mu, sigma)
dLW(x, mu, sigma, log = FALSE) pLW(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qLW(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rLW(n, mu, sigma) hLW(x, mu, sigma)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Log-Weibull Distribution with parameters mu
and sigma
has density given by
for - infty
< y < infty
.
dLW
gives the density, pLW
gives the distribution
function, qLW
gives the quantile function, rLW
generates random deviates and hLW
gives the hazard function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
E.J G (1958). Statistics of extremes. Columbia University Press. ISBN 10:0231021909.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dLW(x, mu=0, sigma=1.5), from=-8, to=5, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pLW(x, mu=0, sigma=1.5), from=-8, to=5, col="red", las=1, ylab="F(x)") curve(pLW(x, mu=0, sigma=1.5, lower.tail=FALSE), from=-8, to=5, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qLW(p, mu=0, sigma=1.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pLW(x, mu=0, sigma=1.5), from=-8, to=5, add=TRUE, col="red") ## The random function hist(rLW(n=10000, mu=0, sigma=1.5), freq=FALSE, xlab="x", las=1, main="") curve(dLW(x, mu=0, sigma=1.5), from=-15, to=6, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hLW(x, mu=0, sigma=1.5), from=-8, to=7, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dLW(x, mu=0, sigma=1.5), from=-8, to=5, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pLW(x, mu=0, sigma=1.5), from=-8, to=5, col="red", las=1, ylab="F(x)") curve(pLW(x, mu=0, sigma=1.5, lower.tail=FALSE), from=-8, to=5, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qLW(p, mu=0, sigma=1.5), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pLW(x, mu=0, sigma=1.5), from=-8, to=5, add=TRUE, col="red") ## The random function hist(rLW(n=10000, mu=0, sigma=1.5), freq=FALSE, xlab="x", las=1, main="") curve(dLW(x, mu=0, sigma=1.5), from=-15, to=6, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hLW(x, mu=0, sigma=1.5), from=-8, to=7, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Marshall-Olkin Extended Inverse Weibull distribution
with parameters mu
, sigma
and nu
.
dMOEIW(x, mu, sigma, nu, log = FALSE) pMOEIW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qMOEIW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rMOEIW(n, mu, sigma, nu) hMOEIW(x, mu, sigma, nu)
dMOEIW(x, mu, sigma, nu, log = FALSE) pMOEIW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qMOEIW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rMOEIW(n, mu, sigma, nu) hMOEIW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Marshall-Olkin Extended Inverse Weibull distribution mu
,
sigma
and nu
has density given by
for x > 0.
dMOEIW
gives the density, pMOEIW
gives the distribution
function, qMOEIW
gives the quantile function, rMOEIW
generates random deviates and hMOEIW
gives the hazard function.
Amylkar Urrea Montoya, [email protected]
Hassan M O, A.H E, A.M.K T, Abdulkareem M Bc (2017). “Extended inverse Weibull distribution with reliability application.” Journal of the Egyptian Mathematical Society, 25, 343–349. doi:10.1016/j.joems.2017.02.006, http://dx.doi.org/10.1016/j.joems.2017.02.006.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dMOEIW(x, mu=0.6, sigma=1.7, nu=0.3), from=0, to=2, col="red", ylab="f(x)", las=1) ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pMOEIW(x, mu=0.6, sigma=1.7, nu=0.3), from=0.0001, to=2, col="red", las=1, ylab="F(x)") curve(pMOEIW(x, mu=0.6, sigma=1.7, nu=0.3, lower.tail=FALSE), from=0.0001, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qMOEIW(p, mu=0.6, sigma=1.7, nu=0.3), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pMOEIW(x, mu=0.6, sigma=1.7, nu=0.3), from=0, add=TRUE, col="red") ## The random function hist(rMOEIW(n=1000, mu=0.6, sigma=1.7, nu=0.3), freq=FALSE, xlab="x", las=1, main="") curve(dMOEIW(x, mu=0.6, sigma=1.7, nu=0.3), from=0.001, to=4, add=TRUE, col="red") ## The Hazard function curve(hMOEIW(x, mu=0.5, sigma=0.7, nu=1), from=0.001, to=3, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dMOEIW(x, mu=0.6, sigma=1.7, nu=0.3), from=0, to=2, col="red", ylab="f(x)", las=1) ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pMOEIW(x, mu=0.6, sigma=1.7, nu=0.3), from=0.0001, to=2, col="red", las=1, ylab="F(x)") curve(pMOEIW(x, mu=0.6, sigma=1.7, nu=0.3, lower.tail=FALSE), from=0.0001, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qMOEIW(p, mu=0.6, sigma=1.7, nu=0.3), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pMOEIW(x, mu=0.6, sigma=1.7, nu=0.3), from=0, add=TRUE, col="red") ## The random function hist(rMOEIW(n=1000, mu=0.6, sigma=1.7, nu=0.3), freq=FALSE, xlab="x", las=1, main="") curve(dMOEIW(x, mu=0.6, sigma=1.7, nu=0.3), from=0.001, to=4, add=TRUE, col="red") ## The Hazard function curve(hMOEIW(x, mu=0.5, sigma=0.7, nu=1), from=0.001, to=3, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Marshall-Olkin Extended Weibull distribution
with parameters mu
, sigma
and nu
.
dMOEW(x, mu, sigma, nu, log = FALSE) pMOEW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qMOEW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rMOEW(n, mu, sigma, nu) hMOEW(x, mu, sigma, nu)
dMOEW(x, mu, sigma, nu, log = FALSE) pMOEW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qMOEW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rMOEW(n, mu, sigma, nu) hMOEW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Marshall-Olkin Extended Weibull distribution mu
,
sigma
and nu
has density given by
for x > 0.
dMOEW
gives the density, pMOEW
gives the distribution
function, qMOEW
gives the quantile function, rMOEW
generates random deviates and hMOEW
gives the hazard function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
M.E G, E.K A, R.A J (2005). “Marshall–Olkin extended weibull distribution and its application to censored data.” Journal of Applied Statistics, 32(10), 1025–1034. doi:10.1080/02664760500165008.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dMOEW(x, mu=0.5, sigma=0.7, nu=1), from=0.001, to=1, col="red", ylab="f(x)", las=1) ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pMOEW(x, mu=0.5, sigma=0.7, nu=1), from=0.0001, to=2, col="red", las=1, ylab="F(x)") curve(pMOEW(x, mu=0.5, sigma=0.7, nu=1, lower.tail=FALSE), from=0.0001, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qMOEW(p, mu=0.5, sigma=0.7, nu=1), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pMOEW(x, mu=0.5, sigma=0.7, nu=1), from=0, add=TRUE, col="red") ## The random function hist(rMOEW(n=100, mu=0.5, sigma=0.7, nu=1), freq=FALSE, xlab="x", ylim=c(0, 1), las=1, main="") curve(dMOEW(x, mu=0.5, sigma=0.7, nu=1), from=0.001, to=2, add=TRUE, col="red") ## The Hazard function curve(hMOEW(x, mu=0.5, sigma=0.7, nu=1), from=0.001, to=3, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dMOEW(x, mu=0.5, sigma=0.7, nu=1), from=0.001, to=1, col="red", ylab="f(x)", las=1) ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pMOEW(x, mu=0.5, sigma=0.7, nu=1), from=0.0001, to=2, col="red", las=1, ylab="F(x)") curve(pMOEW(x, mu=0.5, sigma=0.7, nu=1, lower.tail=FALSE), from=0.0001, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qMOEW(p, mu=0.5, sigma=0.7, nu=1), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pMOEW(x, mu=0.5, sigma=0.7, nu=1), from=0, add=TRUE, col="red") ## The random function hist(rMOEW(n=100, mu=0.5, sigma=0.7, nu=1), freq=FALSE, xlab="x", ylim=c(0, 1), las=1, main="") curve(dMOEW(x, mu=0.5, sigma=0.7, nu=1), from=0.001, to=2, add=TRUE, col="red") ## The Hazard function curve(hMOEW(x, mu=0.5, sigma=0.7, nu=1), from=0.001, to=3, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Desnsity, distribution function, quantile function,
random generation and hazard function for the Marshall-Olkin Kappa distribution
with parameters mu
, sigma
, nu
and tau
.
dMOK(x, mu, sigma, nu, tau, log = FALSE) pMOK(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qMOK(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rMOK(n, mu, sigma, nu, tau) hMOK(x, mu, sigma, nu, tau)
dMOK(x, mu, sigma, nu, tau, log = FALSE) pMOK(q, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) qMOK(p, mu, sigma, nu, tau, lower.tail = TRUE, log.p = FALSE) rMOK(n, mu, sigma, nu, tau) hMOK(x, mu, sigma, nu, tau)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
tau |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Marshall-Olkin Kappa distribution with parameters mu
,
sigma
, nu
and tau
has density given by:
for x > 0.
dMOK
gives the density, pMOK
gives the distribution function,
qMOK
gives the quantile function, rMOK
generates random deviates
and hMOK
gives the hazard function.
Angel Muñoz,
Javed M, Nawaz T, Irfan M (2018). “The Marshall-Olkin kappa distribution: properties and applications.” Journal of King Saud University-Science.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function par(mfrow = c(1,1)) curve(dMOK(x = x, mu = 1, sigma = 3.5, nu = 3, tau = 2), from = 0, to = 15, ylab = 'f(x)', col = 2, las = 1) ## The cumulative distribution and the Reliability function par(mfrow = c(1,2)) curve(pMOK(q = x, mu = 1, sigma = 2.5, nu = 3, tau = 2), from = 0, to = 10, col = 2, lwd = 2, las = 1, ylab = 'F(x)') curve(pMOK(q = x, mu = 1, sigma = 2.5, nu = 3, tau = 2, lower.tail = FALSE), from = 0, to = 10, col = 2, lwd = 2, las = 1, ylab = 'R(x)') ## The quantile function p <- seq(from = 0.00001, to = 0.99999, length.out = 100) plot(x = qMOK(p = p, mu = 4, sigma = 2.5, nu = 3, tau = 2), y = p, xlab = 'Quantile', las = 1, ylab = 'Probability') curve(pMOK(q = x, mu = 4, sigma = 2.5, nu = 3, tau = 2), from = 0, to = 15, add = TRUE, col = 2) ## The random function hist(rMOK(n = 10000, mu = 1, sigma = 2.5, nu = 3, tau = 2), freq = FALSE, xlab = "x", las = 1, main = '', ylim = c(0,.3), xlim = c(0,20), breaks = 50) curve(dMOK(x, mu = 1, sigma = 2.5, nu = 3, tau = 2), from = 0, to = 15, add = TRUE, col = 2) ## The Hazard function par(mfrow = c(1,1)) curve(hMOK(x = x, mu = 1, sigma = 2.5, nu = 3, tau = 2), from = 0, to = 20, col = 2, ylab = 'Hazard function', las = 1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function par(mfrow = c(1,1)) curve(dMOK(x = x, mu = 1, sigma = 3.5, nu = 3, tau = 2), from = 0, to = 15, ylab = 'f(x)', col = 2, las = 1) ## The cumulative distribution and the Reliability function par(mfrow = c(1,2)) curve(pMOK(q = x, mu = 1, sigma = 2.5, nu = 3, tau = 2), from = 0, to = 10, col = 2, lwd = 2, las = 1, ylab = 'F(x)') curve(pMOK(q = x, mu = 1, sigma = 2.5, nu = 3, tau = 2, lower.tail = FALSE), from = 0, to = 10, col = 2, lwd = 2, las = 1, ylab = 'R(x)') ## The quantile function p <- seq(from = 0.00001, to = 0.99999, length.out = 100) plot(x = qMOK(p = p, mu = 4, sigma = 2.5, nu = 3, tau = 2), y = p, xlab = 'Quantile', las = 1, ylab = 'Probability') curve(pMOK(q = x, mu = 4, sigma = 2.5, nu = 3, tau = 2), from = 0, to = 15, add = TRUE, col = 2) ## The random function hist(rMOK(n = 10000, mu = 1, sigma = 2.5, nu = 3, tau = 2), freq = FALSE, xlab = "x", las = 1, main = '', ylim = c(0,.3), xlim = c(0,20), breaks = 50) curve(dMOK(x, mu = 1, sigma = 2.5, nu = 3, tau = 2), from = 0, to = 15, add = TRUE, col = 2) ## The Hazard function par(mfrow = c(1,1)) curve(hMOK(x = x, mu = 1, sigma = 2.5, nu = 3, tau = 2), from = 0, to = 20, col = 2, ylab = 'Hazard function', las = 1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the modified weibull distribution
with parameters mu
, sigma
and nu
.
dMW(x, mu, sigma, nu, log = FALSE) pMW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qMW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rMW(n, mu, sigma, nu) hMW(x, mu, sigma, nu)
dMW(x, mu, sigma, nu, log = FALSE) pMW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qMW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rMW(n, mu, sigma, nu) hMW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
shape parameter one. |
sigma |
parameter two. |
nu |
scale parameter three. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The modified weibull distribution with parameters mu
, sigma
and nu
has density given by
for ,
,
and
.
dMW
gives the density, pMW
gives the distribution
function, qMW
gives the quantile function, rMW
generates random deviates and hMW
gives the hazard function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Lai CD, Xie M, Murthy DNP (2003). “A modified Weibull distribution.” IEEE Transactions on reliability, 52(1), 33–37.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dMW(x, mu=2, sigma=1.5, nu=0.2), from=0, to=2, ylim=c(0, 1.5), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pMW(x, mu=2, sigma=1.5, nu=0.2), from=0, to=2, col = "red", las=1, ylab="F(x)") curve(pMW(x, mu=2, sigma=1.5, nu=0.2, lower.tail = FALSE), from=0, to=2, col="red", las=1, ylab ="R(x)") ## The quantile function p <- seq(from=0, to=0.9999, length.out=100) plot(x=qMW(p, mu=2, sigma=1.5, nu=0.2), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pMW(x, mu=2, sigma=1.5, nu=0.2), from=0, add=TRUE, col="red") ## The random function hist(rMW(n=1000, mu=2, sigma=1.5, nu=0.2), freq=FALSE, xlab="x", las=1, main="") curve(dMW(x, mu=2, sigma=1.5, nu=0.2), from=0, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hMW(x, mu=2, sigma=1.5, nu=0.2), from=0, to=1.5, ylim=c(0, 5), col="red", las=1, ylab="H(x)", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dMW(x, mu=2, sigma=1.5, nu=0.2), from=0, to=2, ylim=c(0, 1.5), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pMW(x, mu=2, sigma=1.5, nu=0.2), from=0, to=2, col = "red", las=1, ylab="F(x)") curve(pMW(x, mu=2, sigma=1.5, nu=0.2, lower.tail = FALSE), from=0, to=2, col="red", las=1, ylab ="R(x)") ## The quantile function p <- seq(from=0, to=0.9999, length.out=100) plot(x=qMW(p, mu=2, sigma=1.5, nu=0.2), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pMW(x, mu=2, sigma=1.5, nu=0.2), from=0, add=TRUE, col="red") ## The random function hist(rMW(n=1000, mu=2, sigma=1.5, nu=0.2), freq=FALSE, xlab="x", las=1, main="") curve(dMW(x, mu=2, sigma=1.5, nu=0.2), from=0, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hMW(x, mu=2, sigma=1.5, nu=0.2), from=0, to=1.5, ylim=c(0, 5), col="red", las=1, ylab="H(x)", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Odd Weibull distribution with
parameters mu
, sigma
and nu
.
dOW(x, mu, sigma, nu, log = FALSE) pOW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qOW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rOW(n, mu, sigma, nu) hOW(x, mu, sigma, nu)
dOW(x, mu, sigma, nu, log = FALSE) pOW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qOW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rOW(n, mu, sigma, nu) hOW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter one. |
sigma |
parameter two. |
nu |
parameter three. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[T <= t], otherwise, P[T > t]. |
p |
vector of probabilities. |
n |
number of observations. |
The Odd Weibull with parameters mu
, sigma
and nu
has density given by
for x > 0.
dOW
gives the density, pOW
gives the distribution
function, qOW
gives the quantile function, rOW
generates random deviates and hOW
gives the hazard function.
Jaime Mosquera Gutiérrez [email protected]
Cooray K (2006). “Generalization of the Weibull distribution: The odd Weibull family.” Statistical Modelling, 6(3), 265–277. ISSN 1471082X, doi:10.1191/1471082X06st116oa.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dOW(x, mu=2, sigma=3, nu=0.2), from=0, to=4, ylim=c(0, 2), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pOW(x, mu=2, sigma=3, nu=0.2), from=0, to=4, ylim=c(0, 1), col="red", las=1, ylab="F(x)") curve(pOW(x, mu=2, sigma=3, nu=0.2, lower.tail=FALSE), from=0, to=4, ylim=c(0, 1), col="red", las=1, ylab = "R(x)") ## The quantile function p <- seq(from=0, to=0.998, length.out=100) plot(x = qOW(p, mu=2, sigma=3, nu=0.2), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pOW(x, mu=2, sigma=3, nu=0.2), from=0, add=TRUE, col="red") ## The random function hist(rOW(n=10000, mu=2, sigma = 3, nu = 0.2), freq=FALSE, ylim = c(0, 2), xlab = "x", las = 1, main = "") curve(dOW(x, mu=2, sigma=3, nu=0.2), from=0, ylim=c(0, 2), add=TRUE, col = "red") ## The Hazard function par(mfrow=c(1,1)) curve(hOW(x, mu=2, sigma=3, nu=0.2), from=0, to=2.5, ylim=c(0, 3), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dOW(x, mu=2, sigma=3, nu=0.2), from=0, to=4, ylim=c(0, 2), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pOW(x, mu=2, sigma=3, nu=0.2), from=0, to=4, ylim=c(0, 1), col="red", las=1, ylab="F(x)") curve(pOW(x, mu=2, sigma=3, nu=0.2, lower.tail=FALSE), from=0, to=4, ylim=c(0, 1), col="red", las=1, ylab = "R(x)") ## The quantile function p <- seq(from=0, to=0.998, length.out=100) plot(x = qOW(p, mu=2, sigma=3, nu=0.2), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pOW(x, mu=2, sigma=3, nu=0.2), from=0, add=TRUE, col="red") ## The random function hist(rOW(n=10000, mu=2, sigma = 3, nu = 0.2), freq=FALSE, ylim = c(0, 2), xlab = "x", las = 1, main = "") curve(dOW(x, mu=2, sigma=3, nu=0.2), from=0, ylim=c(0, 2), add=TRUE, col = "red") ## The Hazard function par(mfrow=c(1,1)) curve(hOW(x, mu=2, sigma=3, nu=0.2), from=0, to=2.5, ylim=c(0, 3), col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Power Lindley distribution
with parameters mu
and sigma
.
dPL(x, mu, sigma, log = FALSE) pPL(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qPL(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rPL(n, mu, sigma) hPL(x, mu, sigma)
dPL(x, mu, sigma, log = FALSE) pPL(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qPL(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rPL(n, mu, sigma) hPL(x, mu, sigma)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Power Lindley Distribution with parameters mu
and sigma
has density given by
for x > 0.
dPL
gives the density, pPL
gives the distribution
function, qPL
gives the quantile function, rPL
generates random deviates and hPL
gives the hazard function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Ghitanya ME, Al-Mutairi DK, Balakrishnanb N, Al-Enezi LJ (2013). “Power Lindley distribution and associated inference.” Computational Statistics and Data Analysis, 64, 20–33. doi:10.1016/j.csda.2013.02.026.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dPL(x, mu=1.5, sigma=0.2), from=0.1, to=10, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pPL(x, mu=1.5, sigma=0.2), from=0.1, to=10, col="red", las=1, ylab="F(x)") curve(pPL(x, mu=1.5, sigma=0.2, lower.tail=FALSE), from=0.1, to=10, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qPL(p, mu=1.5, sigma=0.2), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pPL(x, mu=1.5, sigma=0.2), from=0.1, add=TRUE, col="red") ## The random function hist(rPL(n=1000, mu=1.5, sigma=0.2), freq=FALSE, xlab="x", las=1, main="") curve(dPL(x, mu=1.5, sigma=0.2), from=0.1, to=15, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hPL(x, mu=1.5, sigma=0.2), from=0.1, to=15, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dPL(x, mu=1.5, sigma=0.2), from=0.1, to=10, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pPL(x, mu=1.5, sigma=0.2), from=0.1, to=10, col="red", las=1, ylab="F(x)") curve(pPL(x, mu=1.5, sigma=0.2, lower.tail=FALSE), from=0.1, to=10, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qPL(p, mu=1.5, sigma=0.2), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pPL(x, mu=1.5, sigma=0.2), from=0.1, add=TRUE, col="red") ## The random function hist(rPL(n=1000, mu=1.5, sigma=0.2), freq=FALSE, xlab="x", las=1, main="") curve(dPL(x, mu=1.5, sigma=0.2), from=0.1, to=15, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hPL(x, mu=1.5, sigma=0.2), from=0.1, to=15, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function,quantile function,
random generation and hazard function for the Quasi XGamma Poisson distribution
with parameters mu
, sigma
and nu
.
dQXGP(x, mu, sigma, nu, log = FALSE) pQXGP(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qQXGP(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rQXGP(n, mu, sigma, nu) hQXGP(x, mu, sigma, nu)
dQXGP(x, mu, sigma, nu, log = FALSE) pQXGP(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qQXGP(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rQXGP(n, mu, sigma, nu) hQXGP(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Quasi XGamma Poisson distribution with parameters mu
,
sigma
and nu
has density given by:
for ,
,
,
.
where
dQXGP
gives the density, pQXGP
gives the distribution
function, qQXGP
gives the quantile function, rQXGP
generates random deviates and hQXGP
gives the hazard function.
Simon Zapata
Subhradev S, Mustafa C K, Haitham M Y (2018). “The Quasi XGamma-Poisson distribution: Properties and Application.” Istatistik: Journal of the Turkish Statistical Assocation, 11(3), 65–76. ISSN 1300-4077, https://dergipark.org.tr/en/pub/ijtsa/issue/42850/518206.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dQXGP(x, mu=0.5, sigma=1, nu=1), from=0.1, to=8, ylim=c(0, 0.6), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pQXGP(x, mu=0.5, sigma=1, nu=1), from=0.1, to=8, col="red", las=1, ylab="F(x)") curve(pQXGP(x, mu=0.5, sigma=1, nu=1, lower.tail=FALSE), from=0.1, to=8, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qQXGP(p, mu=0.5, sigma=1, nu=1), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pQXGP(x, mu=0.5, sigma=1, nu=1), from=0.1, add=TRUE, col="red") ## The random function hist(rQXGP(n=1000, mu=0.5, sigma=1, nu=1), freq=FALSE, xlab="x", ylim=c(0, 0.4), las=1, main="", xlim=c(0, 15)) curve(dQXGP(x, mu=0.5, sigma=1, nu=1), from=0.001, to=500, add=TRUE, col="red") ## The Hazard function curve(hQXGP(x, mu=0.5, sigma=1, nu=1), from=0.01, to=3, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dQXGP(x, mu=0.5, sigma=1, nu=1), from=0.1, to=8, ylim=c(0, 0.6), col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pQXGP(x, mu=0.5, sigma=1, nu=1), from=0.1, to=8, col="red", las=1, ylab="F(x)") curve(pQXGP(x, mu=0.5, sigma=1, nu=1, lower.tail=FALSE), from=0.1, to=8, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qQXGP(p, mu=0.5, sigma=1, nu=1), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pQXGP(x, mu=0.5, sigma=1, nu=1), from=0.1, add=TRUE, col="red") ## The random function hist(rQXGP(n=1000, mu=0.5, sigma=1, nu=1), freq=FALSE, xlab="x", ylim=c(0, 0.4), las=1, main="", xlim=c(0, 15)) curve(dQXGP(x, mu=0.5, sigma=1, nu=1), from=0.001, to=500, add=TRUE, col="red") ## The Hazard function curve(hQXGP(x, mu=0.5, sigma=1, nu=1), from=0.01, to=3, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the reduced new modified Weibull
distribution with parameters mu
, sigma
and nu
.
dRNMW(x, mu, sigma, nu, log = FALSE) pRNMW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qRNMW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rRNMW(n, mu, sigma, nu) hRNMW(x, mu, sigma, nu)
dRNMW(x, mu, sigma, nu, log = FALSE) pRNMW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qRNMW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rRNMW(n, mu, sigma, nu) hRNMW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter one. |
sigma |
parameter two. |
nu |
parameter three. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[T <= t], otherwise, P[T > t]. |
p |
vector of probabilities. |
n |
number of observations. |
The reduced new modified Weibull with parameters mu
, sigma
and nu
has density given by
for ,
,
and
.
dRNMW
gives the density, pRNMW
gives the distribution
function, qRNMW
gives the quantile function, rRNMW
generates random deviates and hRNMW
gives the hazard function.
Jaime Mosquera, [email protected]
Almalki, S. J. (2018). A reduced new modified Weibull distribution. Communications in Statistics-Theory and Methods, 47(10), 2297-2313.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve( dRNMW(x, mu = 0.05, sigma = 0.00025, nu = 2.2), from = 0, to = 5, col = "red", las = 1, ylab = "f(x)" ) ## The cualphalative distribution and the Reliability function par(mfrow = c(1, 2)) curve( pRNMW(x, mu = 0.05, sigma = 0.00025, nu = 2.2), from = 0, to = 5, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)" ) curve( pRNMW( x, mu = 0.05, sigma = 0.00025, nu = 2.2, lower.tail = FALSE ), from = 0, to = 5, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)" ) ## The quantile function p <- seq(from = 0, to = 0.999, length.out = 100) plot( x = qRNMW(p, mu = 0.05, sigma = 0.00025, nu = 2.2), y = p, xlab = "Quantile", las = 1, ylab = "Probability" ) curve( pRNMW(x, mu = 0.05, sigma = 0.00025, nu = 2.2), from = 0, add = TRUE, col = "red" ) ## The random function hist( rRNMW(n = 10000, mu = 0.05, sigma = 0.00025, nu = 2.2), freq = FALSE, xlab = "x", las = 1, main = "", ylim = c(0,0.8) ) curve(dRNMW(x, mu = 0.05, sigma = 0.00025, nu = 2.2), from = 0, add = TRUE, col = "red" ) ## The Hazard function par(mfrow = c(1, 1)) curve( hRNMW(x, mu = 0.003, sigma = 5e-6, nu = 0.025), from = 0, to = 250, col = "red", ylab = "Hazard function", las = 1 ) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve( dRNMW(x, mu = 0.05, sigma = 0.00025, nu = 2.2), from = 0, to = 5, col = "red", las = 1, ylab = "f(x)" ) ## The cualphalative distribution and the Reliability function par(mfrow = c(1, 2)) curve( pRNMW(x, mu = 0.05, sigma = 0.00025, nu = 2.2), from = 0, to = 5, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)" ) curve( pRNMW( x, mu = 0.05, sigma = 0.00025, nu = 2.2, lower.tail = FALSE ), from = 0, to = 5, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)" ) ## The quantile function p <- seq(from = 0, to = 0.999, length.out = 100) plot( x = qRNMW(p, mu = 0.05, sigma = 0.00025, nu = 2.2), y = p, xlab = "Quantile", las = 1, ylab = "Probability" ) curve( pRNMW(x, mu = 0.05, sigma = 0.00025, nu = 2.2), from = 0, add = TRUE, col = "red" ) ## The random function hist( rRNMW(n = 10000, mu = 0.05, sigma = 0.00025, nu = 2.2), freq = FALSE, xlab = "x", las = 1, main = "", ylim = c(0,0.8) ) curve(dRNMW(x, mu = 0.05, sigma = 0.00025, nu = 2.2), from = 0, add = TRUE, col = "red" ) ## The Hazard function par(mfrow = c(1, 1)) curve( hRNMW(x, mu = 0.003, sigma = 5e-6, nu = 0.025), from = 0, to = 250, col = "red", ylab = "Hazard function", las = 1 ) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Reflected Weibull Distribution
with parameters mu
and sigma
.
dRW(x, mu, sigma, log = FALSE) pRW(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qRW(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rRW(n, mu, sigma) hRW(x, mu, sigma)
dRW(x, mu, sigma, log = FALSE) pRW(q, mu, sigma, lower.tail = TRUE, log.p = FALSE) qRW(p, mu, sigma, lower.tail = TRUE, log.p = FALSE) rRW(n, mu, sigma) hRW(x, mu, sigma)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Reflected Weibull Distribution with parameters mu
and sigma
has density given by
for y < 0.
dRW
gives the density, pRW
gives the distribution
function, qRW
gives the quantile function, rRW
generates random deviates and hRW
gives the hazard function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Clifford Cohen A (1973). “The Reflected Weibull Distribution.” Technometrics, 15(4), 867–873. doi:10.2307/1267396.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dRW(x, mu=1, sigma=1), from=-5, to=-0.01, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pRW(x, mu=1, sigma=1), from=-5, to=-0.01, col="red", las=1, ylab="F(x)") curve(pRW(x, mu=1, sigma=1, lower.tail=FALSE), from=-5, to=-0.01, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qRW(p, mu=1, sigma=1), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pRW(x, mu=1, sigma=1), from=-5, add=TRUE, col="red") ## The random function hist(rRW(n=10000, mu=1, sigma=1), freq=FALSE, xlab="x", las=1, main="") curve(dRW(x, mu=1, sigma=1), from=-5, to=-0.01, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hRW(x, mu=1, sigma=1), from=-0.3, to=-0.01, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dRW(x, mu=1, sigma=1), from=-5, to=-0.01, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pRW(x, mu=1, sigma=1), from=-5, to=-0.01, col="red", las=1, ylab="F(x)") curve(pRW(x, mu=1, sigma=1, lower.tail=FALSE), from=-5, to=-0.01, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qRW(p, mu=1, sigma=1), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pRW(x, mu=1, sigma=1), from=-5, add=TRUE, col="red") ## The random function hist(rRW(n=10000, mu=1, sigma=1), freq=FALSE, xlab="x", las=1, main="") curve(dRW(x, mu=1, sigma=1), from=-5, to=-0.01, add=TRUE, col="red") ## The Hazard function par(mfrow=c(1,1)) curve(hRW(x, mu=1, sigma=1), from=-0.3, to=-0.01, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for Sarhan and Zaindins modified weibull distribution
with parameters mu
, sigma
and nu
.
dSZMW(x, mu, sigma, nu, log = FALSE) pSZMW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qSZMW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rSZMW(n, mu, sigma, nu) hSZMW(x, mu, sigma, nu)
dSZMW(x, mu, sigma, nu, log = FALSE) pSZMW(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qSZMW(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rSZMW(n, mu, sigma, nu) hSZMW(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
scale parameter. |
sigma |
shape parameter. |
nu |
shape parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Sarhan and Zaindins modified weibull with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
dSZMW
gives the density, pSZMW
gives the distribution
function, qSZMW
gives the quantile function, rSZMW
generates random deviates and hSZMW
gives the hazard function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Sarhan AM, Zaindin M (2009). “Modified Weibull distribution.” APPS. Applied Sciences, 11, 123–136.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dSZMW(x, mu = 2, sigma = 1.5, nu = 0.2), from = 0, to = 2, ylim = c(0, 1.7), col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pSZMW(x, mu = 2, sigma = 1.5, nu = 0.2), from = 0, to = 2, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pSZMW(x, mu = 2, sigma = 1.5, nu = 0.2, lower.tail = FALSE), from = 0, to = 2, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qSZMW(p = p, mu = 2, sigma = 1.5, nu = 0.2), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pSZMW(x, mu = 2, sigma = 1.5, nu = 0.2), from = 0, add = TRUE, col = "red") ## The random function hist(rSZMW(n = 1000, mu = 2, sigma = 1.5, nu = 0.2), freq = FALSE, xlab = "x", las = 1, main = "") curve(dSZMW(x, mu = 2, sigma = 1.5, nu = 0.2), from = 0, add = TRUE, col = "red") ## The Hazard function par(mfrow=c(1,1)) curve(hSZMW(x, mu = 2, sigma = 1.5, nu = 0.2), from = 0, to = 3, ylim = c(0, 8), col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dSZMW(x, mu = 2, sigma = 1.5, nu = 0.2), from = 0, to = 2, ylim = c(0, 1.7), col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pSZMW(x, mu = 2, sigma = 1.5, nu = 0.2), from = 0, to = 2, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pSZMW(x, mu = 2, sigma = 1.5, nu = 0.2, lower.tail = FALSE), from = 0, to = 2, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qSZMW(p = p, mu = 2, sigma = 1.5, nu = 0.2), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pSZMW(x, mu = 2, sigma = 1.5, nu = 0.2), from = 0, add = TRUE, col = "red") ## The random function hist(rSZMW(n = 1000, mu = 2, sigma = 1.5, nu = 0.2), freq = FALSE, xlab = "x", las = 1, main = "") curve(dSZMW(x, mu = 2, sigma = 1.5, nu = 0.2), from = 0, add = TRUE, col = "red") ## The Hazard function par(mfrow=c(1,1)) curve(hSZMW(x, mu = 2, sigma = 1.5, nu = 0.2), from = 0, to = 3, ylim = c(0, 8), col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the weibull geometric distribution with
parameters mu
, sigma
and nu
.
dWG(x, mu, sigma, nu, log = FALSE) pWG(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qWG(p, sigma, mu, nu, lower.tail = TRUE, log.p = FALSE) rWG(n, mu, sigma, nu) hWG(x, mu, sigma, nu)
dWG(x, mu, sigma, nu, log = FALSE) pWG(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qWG(p, sigma, mu, nu, lower.tail = TRUE, log.p = FALSE) rWG(n, mu, sigma, nu) hWG(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
scale parameter. |
sigma |
shape parameter. |
nu |
parameter of geometric random variable. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Weibull geometric distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
dWG
gives the density, pWG
gives the distribution
function, qWG
gives the quantile function, rWG
generates random deviates and hWG
gives the hazard function.
Johan David Marin Benjumea, [email protected]
Barreto-Souza W, de Morais AL, Cordeiro GM (2011). “The Weibull-geometric distribution.” Journal of Statistical Computation and Simulation, 81(5), 645–657.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dWG(x, mu = 0.9, sigma = 2, nu = 0.5), from = 0, to = 3, ylim = c(0, 1.1), col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pWG(x, mu = 0.9, sigma = 2, nu = 0.5), from = 0, to = 3, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pWG(x, mu = 0.9, sigma = 2, nu = 0.5, lower.tail = FALSE), from = 0, to = 3, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qWG(p = p, mu = 0.9, sigma = 2, nu = 0.5), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pWG(x,mu = 0.9, sigma = 2, nu = 0.5), from = 0, add = TRUE, col = "red") ## The random function hist(rWG(1000, mu = 0.9, sigma = 2, nu = 0.5), freq = FALSE, xlab = "x", ylim = c(0, 1.8), las = 1, main = "") curve(dWG(x, mu = 0.9, sigma = 2, nu = 0.5), from = 0, add = TRUE, col = "red", ylim = c(0, 1.8)) ## The Hazard function( par(mfrow=c(1,1)) curve(hWG(x, mu = 0.9, sigma = 2, nu = 0.5), from = 0, to = 8, ylim = c(0, 12), col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dWG(x, mu = 0.9, sigma = 2, nu = 0.5), from = 0, to = 3, ylim = c(0, 1.1), col = "red", las = 1, ylab = "f(x)") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pWG(x, mu = 0.9, sigma = 2, nu = 0.5), from = 0, to = 3, ylim = c(0, 1), col = "red", las = 1, ylab = "F(x)") curve(pWG(x, mu = 0.9, sigma = 2, nu = 0.5, lower.tail = FALSE), from = 0, to = 3, ylim = c(0, 1), col = "red", las = 1, ylab = "R(x)") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qWG(p = p, mu = 0.9, sigma = 2, nu = 0.5), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pWG(x,mu = 0.9, sigma = 2, nu = 0.5), from = 0, add = TRUE, col = "red") ## The random function hist(rWG(1000, mu = 0.9, sigma = 2, nu = 0.5), freq = FALSE, xlab = "x", ylim = c(0, 1.8), las = 1, main = "") curve(dWG(x, mu = 0.9, sigma = 2, nu = 0.5), from = 0, add = TRUE, col = "red", ylim = c(0, 1.8)) ## The Hazard function( par(mfrow=c(1,1)) curve(hWG(x, mu = 0.9, sigma = 2, nu = 0.5), from = 0, to = 8, ylim = c(0, 12), col = "red", ylab = "Hazard function", las = 1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Weighted Generalized Exponential-Exponential distribution
with parameters mu
, sigma
and nu
.
dWGEE(x, mu, sigma, nu, log = FALSE) pWGEE(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qWGEE(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rWGEE(n, mu, sigma, nu) hWGEE(x, mu, sigma, nu)
dWGEE(x, mu, sigma, nu, log = FALSE) pWGEE(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qWGEE(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rWGEE(n, mu, sigma, nu) hWGEE(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Weighted Generalized Exponential-Exponential Distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
dWGEE
gives the density, pWGEE
gives the distribution
function, qWGEE
gives the quantile function, rWGEE
generates random deviates and hWGEE
gives the hazard function.
Johan David Marin Benjumea, [email protected]
Mahdavi A (2015). “Two Weighted Distributions Generated by Exponential Distribution.” Journal of Mathematical Extension, 9(1), 1–12.
Mahdavi A (2015). “Two weighted distributions generated by exponential distribution.” Journal of Mathematical Extension, 9, 1–12.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dWGEE(x, mu = 5, sigma = 0.5, nu = 1), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "The probability density function") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pWGEE(x, mu = 5, sigma = 0.5, nu = 1), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "The cumulative distribution function") curve(pWGEE(x, mu = 5, sigma = 0.5, nu = 1, lower.tail = FALSE), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "The Reliability function") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qWGEE(p = p, mu = 5, sigma = 0.5, nu = 1), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pWGEE(x, mu = 5, sigma = 0.5, nu = 1), from = 0, add = TRUE, col = "red") ## The random function hist(rWGEE(1000, mu = 5, sigma = 0.5, nu = 1), freq = FALSE, xlab = "x", ylim = c(0, 1), las = 1, main = "") curve(dWGEE(x, mu = 5, sigma = 0.5, nu = 1), from = 0, add = TRUE, col = "red", ylim = c(0, 1)) ## The Hazard function( par(mfrow=c(1,1)) curve(hWGEE(x, mu = 5, sigma = 0.5, nu = 1), from = 0, to = 6, ylim = c(0, 1.4), col = "red", ylab = "The hazard function", las = 1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dWGEE(x, mu = 5, sigma = 0.5, nu = 1), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "The probability density function") ## The cumulative distribution and the Reliability function par(mfrow = c(1, 2)) curve(pWGEE(x, mu = 5, sigma = 0.5, nu = 1), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "The cumulative distribution function") curve(pWGEE(x, mu = 5, sigma = 0.5, nu = 1, lower.tail = FALSE), from = 0, to = 6, ylim = c(0, 1), col = "red", las = 1, ylab = "The Reliability function") ## The quantile function p <- seq(from = 0, to = 0.99999, length.out = 100) plot(x = qWGEE(p = p, mu = 5, sigma = 0.5, nu = 1), y = p, xlab = "Quantile", las = 1, ylab = "Probability") curve(pWGEE(x, mu = 5, sigma = 0.5, nu = 1), from = 0, add = TRUE, col = "red") ## The random function hist(rWGEE(1000, mu = 5, sigma = 0.5, nu = 1), freq = FALSE, xlab = "x", ylim = c(0, 1), las = 1, main = "") curve(dWGEE(x, mu = 5, sigma = 0.5, nu = 1), from = 0, add = TRUE, col = "red", ylim = c(0, 1)) ## The Hazard function( par(mfrow=c(1,1)) curve(hWGEE(x, mu = 5, sigma = 0.5, nu = 1), from = 0, to = 6, ylim = c(0, 1.4), col = "red", ylab = "The hazard function", las = 1) par(old_par) # restore previous graphical parameters
Density, distribution function, quantile function,
random generation and hazard function for the Weibull Poisson distribution
with parameters mu
, sigma
and nu
.
dWP(x, mu, sigma, nu, log = FALSE) pWP(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qWP(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rWP(n, mu, sigma, nu) hWP(x, mu, sigma, nu)
dWP(x, mu, sigma, nu, log = FALSE) pWP(q, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) qWP(p, mu, sigma, nu, lower.tail = TRUE, log.p = FALSE) rWP(n, mu, sigma, nu) hWP(x, mu, sigma, nu)
x , q
|
vector of quantiles. |
mu |
parameter. |
sigma |
parameter. |
nu |
parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The Weibull Poisson distribution with parameters mu
,
sigma
and nu
has density given by
for x > 0.
dWP
gives the density, pWP
gives the distribution
function, qWP
gives the quantile function, rWP
generates random deviates and hWP
gives the hazard function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Wanbo L, Daimin S (1967). “A new compounding life distribution: the Weibull–Poisson distribution.” Journal of Applied Statistics, 9(1), 21–38. doi:10.1080/02664763.2011.575126, https://doi.org/10.1080/02664763.2011.575126.
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dWP(x, mu=1.5, sigma=0.5, nu=10), from=0.0001, to=2, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pWP(x, mu=1.5, sigma=0.5, nu=10), from=0.0001, to=2, col="red", las=1, ylab="F(x)") curve(pWP(x, mu=1.5, sigma=0.5, nu=10, lower.tail=FALSE), from=0.0001, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qWP(p, mu=1.5, sigma=0.5, nu=10), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pWP(x, mu=1.5, sigma=0.5, nu=10), from=0, add=TRUE, col="red") ## The random function hist(rWP(n=10000, mu=1.5, sigma=0.5, nu=10), freq=FALSE, xlab="x", ylim=c(0, 2.2), las=1, main="") curve(dWP(x, mu=1.5, sigma=0.5, nu=10), from=0.001, to=4, add=TRUE, col="red") ## The Hazard function curve(hWP(x, mu=1.5, sigma=0.5, nu=10), from=0.001, to=5, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
old_par <- par(mfrow = c(1, 1)) # save previous graphical parameters ## The probability density function curve(dWP(x, mu=1.5, sigma=0.5, nu=10), from=0.0001, to=2, col="red", las=1, ylab="f(x)") ## The cumulative distribution and the Reliability function par(mfrow=c(1, 2)) curve(pWP(x, mu=1.5, sigma=0.5, nu=10), from=0.0001, to=2, col="red", las=1, ylab="F(x)") curve(pWP(x, mu=1.5, sigma=0.5, nu=10, lower.tail=FALSE), from=0.0001, to=2, col="red", las=1, ylab="R(x)") ## The quantile function p <- seq(from=0, to=0.99999, length.out=100) plot(x=qWP(p, mu=1.5, sigma=0.5, nu=10), y=p, xlab="Quantile", las=1, ylab="Probability") curve(pWP(x, mu=1.5, sigma=0.5, nu=10), from=0, add=TRUE, col="red") ## The random function hist(rWP(n=10000, mu=1.5, sigma=0.5, nu=10), freq=FALSE, xlab="x", ylim=c(0, 2.2), las=1, main="") curve(dWP(x, mu=1.5, sigma=0.5, nu=10), from=0.001, to=4, add=TRUE, col="red") ## The Hazard function curve(hWP(x, mu=1.5, sigma=0.5, nu=10), from=0.001, to=5, col="red", ylab="Hazard function", las=1) par(old_par) # restore previous graphical parameters
The Extended Exponential Geometric family
EEG(mu.link = "log", sigma.link = "log")
EEG(mu.link = "log", sigma.link = "log")
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. |
The Extended Exponential Geometric distribution with parameters mu
and sigma
has density given by
for ,
and
.
Returns a gamlss.family object which can be used to fit a EEG distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Adamidis K, Dimitrakopoulou T, Loukas S (2005). “On an extension of the exponential-geometric distribution.” Statistics & probability letters, 73(3), 259–269.
# Generating some random values with # known mu, sigma, nu and tau y <- rEEG(n=100, mu = 1, sigma =1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family=EEG, control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.1, max=0.2) x2 <- runif(n, min=0.1, max=0.15) mu <- exp(0.75 - x1) sigma <- exp(0.5 - x2) x <- rEEG(n=n, mu, sigma) mod <- gamlss(x~x1, sigma.fo=~x2, family=EEG, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
# Generating some random values with # known mu, sigma, nu and tau y <- rEEG(n=100, mu = 1, sigma =1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family=EEG, control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.1, max=0.2) x2 <- runif(n, min=0.1, max=0.15) mu <- exp(0.75 - x1) sigma <- exp(0.5 - x2) x <- rEEG(n=n, mu, sigma) mod <- gamlss(x~x1, sigma.fo=~x2, family=EEG, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
The four parameter Exponentiated Generalized Gamma distribution
EGG(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
EGG(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
tau.link |
defines the tau.link, with "log" link as the default for the tau parameter. |
Four parameter Exponentiated Generalized Gamma distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a EGG distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Gauss M. C, Edwin M.M O, Giovana O. S (2011). “The exponentiated generalized gamma distribution with application to lifetime data.” Journal of Statistical Computation and Simulation, 81(7), 827–842. doi:10.1080/00949650903517874.
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rEGG(n=500, mu=0.1, sigma=0.8, nu=10, tau=1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family='EGG', control=gamlss.control(n.cyc=500, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.2, max=0.8) x2 <- runif(n, min=0.2, max=0.8) mu <- exp(-0.8 + -3 * x1) sigma <- exp(0.77 - 2 * x2) nu <- 10 tau <- 1.5 y <- rEGG(n=n, mu, sigma, nu, tau) mod <- gamlss(y~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=EGG, control=gamlss.control(n.cyc=500, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau"))
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rEGG(n=500, mu=0.1, sigma=0.8, nu=10, tau=1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family='EGG', control=gamlss.control(n.cyc=500, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.2, max=0.8) x2 <- runif(n, min=0.2, max=0.8) mu <- exp(-0.8 + -3 * x1) sigma <- exp(0.77 - 2 * x2) nu <- 10 tau <- 1.5 y <- rEGG(n=n, mu, sigma, nu, tau) mod <- gamlss(y~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=EGG, control=gamlss.control(n.cyc=500, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau"))
The Exponentiated Modifien Weibull Extension family
EMWEx(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
EMWEx(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
tau.link |
defines the tau.link, with "log" link as the default for the tau parameter. |
The Beta-Weibull distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for ,
,
,
and
.
Returns a gamlss.family object which can be used to fit a EMWEx distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Sarhan AM, Apaloo J (2013). “Exponentiated modified Weibull extension distribution.” Reliability Engineering & System Safety, 112, 137–144.
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rEMWEx(n=100, mu = 1, sigma =1.21, nu=1, tau=2) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family=EMWEx, control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.75 - x1) sigma <- exp(0.5 - x2) nu <- 1 tau <- 2 x <- rEMWEx(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=EMWEx, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau"))
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rEMWEx(n=100, mu = 1, sigma =1.21, nu=1, tau=2) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family=EMWEx, control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.75 - x1) sigma <- exp(0.5 - x2) nu <- 1 tau <- 2 x <- rEMWEx(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=EMWEx, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau"))
The Extended Odd Frechet-Nadarjad-Hanhighi family
EOFNH(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
EOFNH(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
tau.link |
defines the tau.link, with "log" link as the default for the tau parameter. |
The Extended Odd Frechet-Nadarjad-Hanhighi distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for ,
,
,
and
.
Returns a gamlss.family object which can be used to fit a EOFNH distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Nasiru S (2018). “Extended Odd Fréchet-G Family of Distributions.” Journal of Probability and Statistics, 2018.
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rEOFNH(n=100, mu=1, sigma=2.1, nu=0.8, tau=1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family=EOFNH, control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.5 + x1) sigma <- exp(0.8 + x2) nu <- 1 tau <- 0.5 x <- rEOFNH(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=EOFNH, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau"))
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rEOFNH(n=100, mu=1, sigma=2.1, nu=0.8, tau=1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family=EOFNH, control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.5 + x1) sigma <- exp(0.8 + x2) nu <- 1 tau <- 0.5 x <- rEOFNH(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=EOFNH, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau"))
Time to failure in hours of 18 units of the same electronic device.
data(equipment)
data(equipment)
A vector with 18 observations.
data(equipment) hist(equipment, main="", xlab="Time (h)")
data(equipment) hist(equipment, main="", xlab="Time (h)")
The Exponentiated Weibull distribution
EW(mu.link = "log", sigma.link = "log", nu.link = "log")
EW(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Exponentiated Weibull Distribution with parameters mu
,
sigma
and nu
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a EW distribution in the gamlss()
function.
# Example 1 # Generating some random values with # known mu, sigma and nu # Will not be run this example because high number is cycles # is needed in order to get good estimates ## Not run: y <- rEW(n=100, mu=2, sigma=1.5, nu=0.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='EW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) ## End(Not run) # Example 2 # Generating random values under some model # Will not be run this example because high number is cycles # is needed in order to get good estimates ## Not run: n <- 200 x1 <- rpois(n, lambda=2) x2 <- runif(n) mu <- exp(2 + -3 * x1) sigma <- exp(3 - 2 * x2) nu <- 2 x <- rEW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=EW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) ## End(Not run)
# Example 1 # Generating some random values with # known mu, sigma and nu # Will not be run this example because high number is cycles # is needed in order to get good estimates ## Not run: y <- rEW(n=100, mu=2, sigma=1.5, nu=0.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='EW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) ## End(Not run) # Example 2 # Generating random values under some model # Will not be run this example because high number is cycles # is needed in order to get good estimates ## Not run: n <- 200 x1 <- rpois(n, lambda=2) x2 <- runif(n) mu <- exp(2 + -3 * x1) sigma <- exp(3 - 2 * x2) nu <- 2 x <- rEW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=EW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) ## End(Not run)
The function EXL()
defines The exponentiated XLindley,
a two parameter distribution, for a gamlss.family
object
to be used in GAMLSS fitting
using the function gamlss()
.
EXL(mu.link = "log", sigma.link = "log")
EXL(mu.link = "log", sigma.link = "log")
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. |
The exponentiated XLindley with parameters mu
and sigma
has density given by
for ,
and
.
Note: In this implementation we changed the original parameters
for
and
for
we
did it to implement this distribution within gamlss framework.
Returns a gamlss.family object which can be used to fit a
EXL distribution in the gamlss()
function.
Manuel Gutierrez Tangarife, [email protected]
Alomair, A. M., Ahmed, M., Tariq, S., Ahsan-ul-Haq, M., & Talib, J. (2024). An exponentiated XLindley distribution with properties, inference and applications. Heliyon, 10(3).
EXL.
# Example 1 # Generating some random values with # known mu and sigma y <- rEXL(n=1000, mu=0.75, sigma=1.3) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family="EXL") # Extracting the fitted values for mu and sigma # using the inverse link function exp(coef(mod, what="mu")) exp(coef(mod, what="sigma")) # Example 2 # Generating random values under some model n <- 1000 x1 <- runif(n) x2 <- runif(n) mu <- exp(1.45 - 3 * x1) sigma <- exp(2 - 1.5 * x2) y <- rEXL(n=n, mu=mu, sigma=sigma) mod <- gamlss(y~x1, sigma.fo=~x2, family=EXL) summary(mod)
# Example 1 # Generating some random values with # known mu and sigma y <- rEXL(n=1000, mu=0.75, sigma=1.3) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family="EXL") # Extracting the fitted values for mu and sigma # using the inverse link function exp(coef(mod, what="mu")) exp(coef(mod, what="sigma")) # Example 2 # Generating random values under some model n <- 1000 x1 <- runif(n) x2 <- runif(n) mu <- exp(1.45 - 3 * x1) sigma <- exp(2 - 1.5 * x2) y <- rEXL(n=n, mu=mu, sigma=sigma) mod <- gamlss(y~x1, sigma.fo=~x2, family=EXL) summary(mod)
The Extended Weibull family
ExW(mu.link = "log", sigma.link = "log", nu.link = "log")
ExW(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Extended Weibull distribution with parameters mu
,
sigma
and nu
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a ExW distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Tieling Z, Min X (2007). “Failure Data Analysis with Extended Weibull Distribution.” Communications in Statistics - Simulation and Computation, 36, 579–592. doi:10.1080/03610910701236081.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rExW(n=200, mu=0.3, sigma=2, nu=0.05) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='ExW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 500 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-2 + 3 * x1) sigma <- exp(1.3 - 2 * x2) nu <- 0.05 x <- rExW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=ExW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rExW(n=200, mu=0.3, sigma=2, nu=0.05) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='ExW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 500 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-2 + 3 * x1) sigma <- exp(1.3 - 2 * x2) nu <- 0.05 x <- rExW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=ExW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
The function FWE()
defines the Flexible Weibull distribution, a two parameter
distribution, for a gamlss.family
object to be used in GAMLSS fitting
using the function gamlss()
.
FWE(mu.link = "log", sigma.link = "log")
FWE(mu.link = "log", sigma.link = "log")
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. |
The Flexible Weibull extension with parameters mu
and sigma
has density given by
for x>0.
Returns a gamlss.family object which can be used to fit a FWE distribution in the gamlss()
function.
# Example 1 # Generating some random values with # known mu and sigma y <- rFWE(n=100, mu=0.75, sigma=1.3) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family='FWE', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu and sigma # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n) x2 <- runif(n) mu <- exp(1.21 - 3 * x1) sigma <- exp(1.26 - 2 * x2) x <- rFWE(n=n, mu, sigma) mod <- gamlss(x~x1, sigma.fo=~x2, family=FWE, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
# Example 1 # Generating some random values with # known mu and sigma y <- rFWE(n=100, mu=0.75, sigma=1.3) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family='FWE', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu and sigma # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n) x2 <- runif(n) mu <- exp(1.21 - 3 * x1) sigma <- exp(1.26 - 2 * x2) x <- rFWE(n=n, mu, sigma) mod <- gamlss(x~x1, sigma.fo=~x2, family=FWE, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
The Gamma Weibull family
GammaW(mu.link = "log", sigma.link = "log", nu.link = "log")
GammaW(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Gamma Weibull distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
Returns a gamlss.family object which can be used to fit a GammaW distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Stacy EW, others (1962). “A generalization of the gamma distribution.” The Annals of mathematical statistics, 33(3), 1187–1192.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rGammaW(n=100, mu = 0.5, sigma = 2, nu=1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='GammaW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n) x2 <- runif(n) mu <- exp(-1.6 * x1) sigma <- exp(1.1 - 1 * x2) nu <- 1 x <- rGammaW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, mu.fo=~x1, sigma.fo=~x2, nu.fo=~1, family=GammaW, control=gamlss.control(n.cyc=50000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") coef(mod, what='nu')
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rGammaW(n=100, mu = 0.5, sigma = 2, nu=1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='GammaW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n) x2 <- runif(n) mu <- exp(-1.6 * x1) sigma <- exp(1.1 - 1 * x2) nu <- 1 x <- rGammaW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, mu.fo=~x1, sigma.fo=~x2, nu.fo=~1, family=GammaW, control=gamlss.control(n.cyc=50000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") coef(mod, what='nu')
The Generalized Gompertz family
GGD(mu.link = "log", sigma.link = "log", nu.link = "log")
GGD(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Generalized Gompertz Distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
Returns a gamlss.family object which can be used to fit a GGD distribution in the gamlss()
function.
.
Johan David Marin Benjumea, [email protected]
El-Gohary A, Alshamrani A, Al-Otaibi AN (2013). “The generalized Gompertz distribution.” Applied Mathematical Modelling, 37(1-2), 13–24.
#Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rGGD(n=1000, mu=1, sigma=0.3, nu=1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='GGD', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.5 - x1) sigma <- exp(-1 - x2) nu <- 1.5 x <- rGGD(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=GGD, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
#Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rGGD(n=1000, mu=1, sigma=0.3, nu=1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='GGD', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.5 - x1) sigma <- exp(-1 - x2) nu <- 1.5 x <- rGGD(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=GGD, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
The Generalized Inverse Weibull family
GIW(mu.link = "log", sigma.link = "log", nu.link = "log")
GIW(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Generalized Inverse Weibull distribution with parameters mu
,
sigma
and nu
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a GIW distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Felipe R SdG, Edwin M MO, Gauss M C (2009). “The generalized inverse Weibull distribution.” Statistical papers, 52(3), 591–619. doi:10.1007/s00362-009-0271-3.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rGIW(n=200, mu=3, sigma=5, nu=0.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='GIW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 500 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-1.02 + 3 * x1) sigma <- exp(1.69 - 2 * x2) nu <- 0.5 x <- rGIW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=GIW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rGIW(n=200, mu=3, sigma=5, nu=0.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='GIW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 500 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-1.02 + 3 * x1) sigma <- exp(1.69 - 2 * x2) nu <- 0.5 x <- rGIW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=GIW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
The Generalized modified Weibull distribution
GMW(mu.link = "log", sigma.link = "log", nu.link = "sqrt", tau.link = "sqrt")
GMW(mu.link = "log", sigma.link = "log", nu.link = "sqrt", tau.link = "sqrt")
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. |
nu.link |
defines the nu.link, with "sqrt" link as the default for the nu parameter. |
tau.link |
defines the tau.link, with "sqrt" link as the default for the tau parameter. |
The Generalized modified Weibull distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a GMW distribution in the gamlss()
function.
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rGMW(n=100, mu=2, sigma=0.5, nu=2, tau=1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~ 1, family='GMW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) (coef(mod, what='nu'))^2 (coef(mod, what='tau'))^2 # Example 2 # Generating random values under some model ## Not run: n <- 1000 x1 <- runif(n) x2 <- runif(n) mu <- exp(2 + -3 * x1) sigma <- exp(3 - 2 * x2) nu <- 2 tau <- 1.5 x <- rGMW(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~ 1, family="GMW", control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") coef(mod, what="nu")^2 coef(mod, what="tau")^2 ## End(Not run)
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rGMW(n=100, mu=2, sigma=0.5, nu=2, tau=1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~ 1, family='GMW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) (coef(mod, what='nu'))^2 (coef(mod, what='tau'))^2 # Example 2 # Generating random values under some model ## Not run: n <- 1000 x1 <- runif(n) x2 <- runif(n) mu <- exp(2 + -3 * x1) sigma <- exp(3 - 2 * x2) nu <- 2 tau <- 1.5 x <- rGMW(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~ 1, family="GMW", control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") coef(mod, what="nu")^2 coef(mod, what="tau")^2 ## End(Not run)
This function can be used so as to get suggestions about initial values
and the search region for parameter estimation in OW
distribution.
initValuesOW( formula, data = NULL, local_reg = loess.options(), interpolation = interp.options(), ... )
initValuesOW( formula, data = NULL, local_reg = loess.options(), interpolation = interp.options(), ... )
formula |
an object of class |
data |
an optional data frame containing the response variables. If
data is not specified, the variables are taken from the
environment from which |
local_reg |
a list of control parameters for LOESS. See
|
interpolation |
a list of control parameters for interpolation function. See
|
... |
further arguments passed to
|
This function performs a non-parametric estimation of the empirical total time on test (TTT) plot. Then, this estimated curve can be used so as to get suggestions about initial values and the search region for parameters based on hazard shape associated to the shape of empirical TTT plot.
Returns an object of class c("initValOW", "HazardShape")
containing:
sigma.start
value for parameter of OW distribution.
nu.start
value for parameter of OW distribution.
sigma.valid
search region for parameter of OW distribution.
nu.valid
search region for parameter of OW distribution.
TTTplot
Total Time on Test transform computed from the data.
hazard_type
shape of the hazard function determined from the TTT
plot.
Jaime Mosquera Gutiérrez [email protected]
# Example 1 # Bathtuh hazard and its corresponding TTT plot y1 <- rOW(n = 1000, mu = 0.1, sigma = 7, nu = 0.08) my_initial_guess1 <- initValuesOW(formula=y1~1) summary(my_initial_guess1) plot(my_initial_guess1, par_plot=list(mar=c(3.7,3.7,1,2.5), mgp=c(2.5,1,0))) curve(hOW(x, mu = 0.022, sigma = 8, nu = 0.01), from = 0, to = 80, ylim = c(0, 0.04), col = "red", ylab = "Hazard function", las = 1) # Example 2 # Bathtuh hazard and its corresponding TTT plot with right censored data y2 <- rOW(n = 1000, mu = 0.1, sigma = 7, nu = 0.08) status <- c(rep(1, 980), rep(0, 20)) my_initial_guess2 <- initValuesOW(formula=Surv(y2, status)~1) summary(my_initial_guess2) plot(my_initial_guess2, par_plot=list(mar=c(3.7,3.7,1,2.5), mgp=c(2.5,1,0))) curve(hOW(x, mu = 0.022, sigma = 8, nu = 0.01), from = 0, to = 80, ylim = c(0, 0.04), col = "red", ylab = "Hazard function", las = 1)
# Example 1 # Bathtuh hazard and its corresponding TTT plot y1 <- rOW(n = 1000, mu = 0.1, sigma = 7, nu = 0.08) my_initial_guess1 <- initValuesOW(formula=y1~1) summary(my_initial_guess1) plot(my_initial_guess1, par_plot=list(mar=c(3.7,3.7,1,2.5), mgp=c(2.5,1,0))) curve(hOW(x, mu = 0.022, sigma = 8, nu = 0.01), from = 0, to = 80, ylim = c(0, 0.04), col = "red", ylab = "Hazard function", las = 1) # Example 2 # Bathtuh hazard and its corresponding TTT plot with right censored data y2 <- rOW(n = 1000, mu = 0.1, sigma = 7, nu = 0.08) status <- c(rep(1, 980), rep(0, 20)) my_initial_guess2 <- initValuesOW(formula=Surv(y2, status)~1) summary(my_initial_guess2) plot(my_initial_guess2, par_plot=list(mar=c(3.7,3.7,1,2.5), mgp=c(2.5,1,0))) curve(hOW(x, mu = 0.022, sigma = 8, nu = 0.01), from = 0, to = 80, ylim = c(0, 0.04), col = "red", ylab = "Hazard function", las = 1)
The Inverse Weibull distribution
IW(mu.link = "log", sigma.link = "log")
IW(mu.link = "log", sigma.link = "log")
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. |
The Inverse Weibull distribution with parameters mu
,
sigma
has density given by
for ,
and
Returns a gamlss.family object which can be used to fit a IW distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Drapella A (1993). “The complementary Weibull distribution: unknown or just forgotten?” Quality and Reliability Engineering International, 9(4), 383–385.
# Example 1 # Generating some random values with # known mu and sigma y <- rIW(n=100, mu=5, sigma=2.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, mu.fo=~1, sigma.fo=~1, family='IW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- rpois(n, lambda=2) x2 <- runif(n) mu <- exp(2 + -1 * x1) sigma <- exp(2 - 2 * x2) x <- rIW(n=n, mu, sigma) mod <- gamlss(x~x1, mu.fo=~1, sigma.fo=~x2, family=IW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
# Example 1 # Generating some random values with # known mu and sigma y <- rIW(n=100, mu=5, sigma=2.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, mu.fo=~1, sigma.fo=~1, family='IW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- rpois(n, lambda=2) x2 <- runif(n) mu <- exp(2 + -1 * x1) sigma <- exp(2 - 2 * x2) x <- rIW(n=n, mu, sigma) mod <- gamlss(x~x1, mu.fo=~1, sigma.fo=~x2, family=IW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
The Kumaraswamy Inverse Weibull family
KumIW(mu.link = "log", sigma.link = "log", nu.link = "log")
KumIW(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Kumaraswamy Inverse Weibull Distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
Returns a gamlss.family object which can be used to fit a KumIW distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Shahbaz MQ, Shahbaz S, Butt NS (2012). “The Kumaraswamy-Inverse Weibull Distribution.” Shahbaz, MQ, Shahbaz, S., & Butt, NS (2012). The Kumaraswamy–Inverse Weibull Distribution. Pakistan journal of statistics and operation research, 8(3), 479–489.
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rKumIW(n=1000, mu = 1.5, sigma= 1.5, nu = 5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='KumIW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(1 - x1) sigma <- exp(1 - x2) nu <- 5 x <- rKumIW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=KumIW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rKumIW(n=1000, mu = 1.5, sigma= 1.5, nu = 5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='KumIW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(1 - x1) sigma <- exp(1 - x2) nu <- 5 x <- rKumIW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=KumIW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
The function LIN()
defines the Lindley distribution with only one parameter
for a gamlss.family
object to be used in GAMLSS fitting
using the function gamlss()
.
LIN(mu.link = "log")
LIN(mu.link = "log")
mu.link |
defines the mu.link, with "log" link as the default for the mu parameter. |
The Lindley with parameter mu
has density given by
for x > 0 and .
Returns a gamlss.family object which can be used to fit a LIN distribution in the gamlss()
function.
Freddy Hernandez [email protected]
Lindley DV (1958). “Fiducial distributions and Bayes' theorem.” Journal of the Royal Statistical Society. Series B (Methodological), 102–107.
Lindley DV (1965). Introduction to probability and statistics: from a Bayesian viewpoint. 2. Inference. CUP Archive.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rLIN(n=200, mu=2) # Fitting the model require(gamlss) mod <- gamlss(y ~ 1, family="LIN") # Extracting the fitted values for mu # using the inverse link function exp(coef(mod, what='mu')) # Example 2 # Generating random values under some model n <- 100 x1 <- runif(n=n) x2 <- runif(n=n) eta <- 1 + 3 * x1 - 2 * x2 mu <- exp(eta) y <- rLIN(n=n, mu=mu) mod <- gamlss(y ~ x1 + x2, family=LIN) coef(mod, what='mu')
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rLIN(n=200, mu=2) # Fitting the model require(gamlss) mod <- gamlss(y ~ 1, family="LIN") # Extracting the fitted values for mu # using the inverse link function exp(coef(mod, what='mu')) # Example 2 # Generating random values under some model n <- 100 x1 <- runif(n=n) x2 <- runif(n=n) eta <- 1 + 3 * x1 - 2 * x2 mu <- exp(eta) y <- rLIN(n=n, mu=mu) mod <- gamlss(y ~ x1 + x2, family=LIN) coef(mod, what='mu')
The Log-Weibull distribution
LW(mu.link = "identity", sigma.link = "log")
LW(mu.link = "identity", sigma.link = "log")
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. |
The Log-Weibull Distribution with parameters mu
and sigma
has density given by
for - infty
< y < infty
.
Returns a gamlss.family object which can be used to fit a LW distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
E.J G (1958). Statistics of extremes. Columbia University Press. ISBN 10:0231021909.
# Example 1 # Generating some random values with # known mu and sigma y <- rLW(n=100, mu=0, sigma=1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family= 'LW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu and sigma # using the inverse link function coef(mod, 'mu') exp(coef(mod, 'sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- 1.5 - 3 * x1 sigma <- exp(1.4 - 2 * x2) x <- rLW(n=n, mu, sigma) mod <- gamlss(x~x1, sigma.fo=~x2, family=LW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
# Example 1 # Generating some random values with # known mu and sigma y <- rLW(n=100, mu=0, sigma=1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family= 'LW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu and sigma # using the inverse link function coef(mod, 'mu') exp(coef(mod, 'sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- 1.5 - 3 * x1 sigma <- exp(1.4 - 2 * x2) x <- rLW(n=n, mu, sigma) mod <- gamlss(x~x1, sigma.fo=~x2, family=LW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
The ages at death in weeks for male mice exposed to 240r of gamma radiation.
data(mice)
data(mice)
A vector with 208 data points.
data(mice) hist(mice, main="", xlab="Time (weeks)", freq=FALSE) lines(density(mice), col="blue", lwd=2)
data(mice) hist(mice, main="", xlab="Time (weeks)", freq=FALSE) lines(density(mice), col="blue", lwd=2)
The Marshall-Olkin Extended Inverse Weibull family
MOEIW(mu.link = "log", sigma.link = "log", nu.link = "log")
MOEIW(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Marshall-Olkin Extended Inverse Weibull distribution with parameters mu
,
sigma
and nu
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a MOEIW distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Hassan M O, A.H E, A.M.K T, Abdulkareem M Bc (2017). “Extended inverse Weibull distribution with reliability application.” Journal of the Egyptian Mathematical Society, 25, 343–349. doi:10.1016/j.joems.2017.02.006, http://dx.doi.org/10.1016/j.joems.2017.02.006.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rMOEIW(n=400, mu=0.6, sigma=1.7, nu=0.3) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='MOEIW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 400 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-2.02 + 3 * x1) sigma <- exp(2.23 - 2 * x2) nu <- 0.3 x <- rMOEIW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=MOEIW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rMOEIW(n=400, mu=0.6, sigma=1.7, nu=0.3) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='MOEIW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 400 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-2.02 + 3 * x1) sigma <- exp(2.23 - 2 * x2) nu <- 0.3 x <- rMOEIW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=MOEIW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
The Marshall-Olkin Extended Weibull family
MOEW(mu.link = "log", sigma.link = "log", nu.link = "log")
MOEW(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Marshall-Olkin Extended Weibull distribution with parameters mu
,
sigma
and nu
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a MOEW distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
M.E G, E.K A, R.A J (2005). “Marshall–Olkin extended weibull distribution and its application to censored data.” Journal of Applied Statistics, 32(10), 1025–1034. doi:10.1080/02664760500165008.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rMOEW(n=400, mu=0.5, sigma=0.7, nu=1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='MOEW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 500 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-1.20 + 3 * x1) sigma <- exp(0.84 - 2 * x2) nu <- 1 x <- rMOEW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=MOEW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rMOEW(n=400, mu=0.5, sigma=0.7, nu=1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='MOEW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 500 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-1.20 + 3 * x1) sigma <- exp(0.84 - 2 * x2) nu <- 1 x <- rMOEW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=MOEW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
The Marshall-Olkin Kappa family
MOK(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
MOK(mu.link = "log", sigma.link = "log", nu.link = "log", tau.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
tau.link |
defines the tau.link, with "log" link as the default for the tau parameter. |
The Marshall-Olkin Kappa distribution with parameters mu
,
sigma
, nu
and tau
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a MOK distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Javed M, Nawaz T, Irfan M (2018). “The Marshall-Olkin kappa distribution: properties and applications.” Journal of King Saud University-Science.
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rMOK(n=100, mu = 1, sigma = 3.5, nu = 3, tau = 2) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family=MOK, control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.5 + x1) sigma <- exp(0.8 + x2) nu <- 1 tau <- 0.5 x <- rMOK(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=MOK, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau"))
# Example 1 # Generating some random values with # known mu, sigma, nu and tau y <- rMOK(n=100, mu = 1, sigma = 3.5, nu = 3, tau = 2) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, tau.fo=~1, family=MOK, control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma, nu and tau # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) exp(coef(mod, what='tau')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(0.5 + x1) sigma <- exp(0.8 + x2) nu <- 1 tau <- 0.5 x <- rMOK(n=n, mu, sigma, nu, tau) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, tau.fo=~1, family=MOK, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu")) exp(coef(mod, what="tau"))
#' The Modified Weibull distribution
MW(mu.link = "log", sigma.link = "log", nu.link = "log")
MW(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Modified Weibull distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
Returns a gamlss.family object which can be used to fit a MW distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Lai CD, Xie M, Murthy DNP (2003). “A modified Weibull distribution.” IEEE Transactions on reliability, 52(1), 33–37.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rMW(n=100, mu = 2, sigma = 1.5, nu = 0.2) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family= 'MW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- rpois(n, lambda=2) x2 <- runif(n) mu <- exp(3 -1 * x1) sigma <- exp(2 - 2 * x2) nu <- 0.2 x <- rMW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, mu.fo=~x1, sigma.fo=~x2, nu.fo=~1, family=MW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") coef(mod, what='nu')
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rMW(n=100, mu = 2, sigma = 1.5, nu = 0.2) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family= 'MW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- rpois(n, lambda=2) x2 <- runif(n) mu <- exp(3 -1 * x1) sigma <- exp(2 - 2 * x2) nu <- 0.2 x <- rMW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, mu.fo=~x1, sigma.fo=~x2, nu.fo=~1, family=MW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") coef(mod, what='nu')
This function can be used to modify OW
gamlss.family
object
in order to set a customized region search for gamlss()
function.
myOW_region(family = OW, valid.values = "auto", initVal)
myOW_region(family = OW, valid.values = "auto", initVal)
family |
The |
valid.values |
a list of character elements specifying the region for
|
initVal |
An |
This function was created to help users to fit OW
distribution easily
bounding the parametric space for sigma
and nu
.
The valid.values
must be defined as a list of characters containing a call
of the all
function.
Returns a gamlss.family
object which can be used to fit an OW
distribution in the gamlss()
function.
Jaime Mosquera Gutiérrez [email protected]
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rOW(n=200, mu=0.2, sigma=4, nu=0.05) # Custom search region myvalues <- list(sigma="all(sigma > 1)", nu="all(nu < 1) & all(nu < 1)") my_initial_guess <- initValuesOW(formula=y~1) summary(my_initial_guess) # OW family modified with 'myOW_region' require(gamlss) myOW <- myOW_region(valid.values=myvalues, initVal=my_initial_guess) mod1 <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, sigma.start=param.startOW('sigma', my_initial_guess), nu.start=param.startOW('nu', my_initial_guess), control=gamlss.control(n.cyc=300, trace=FALSE), family=myOW) exp(coef(mod1, what='mu')) exp(coef(mod1, what='sigma')) exp(coef(mod1, what='nu')) # Example 2 # Same example using another link function and using 'myOW_region' # in the argument 'family' mod2 <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, sigma.start=2, nu.start=0.1, control=gamlss.control(n.cyc=300, trace=FALSE), family=myOW_region(family=OW(sigma.link='identity'), valid.values=myvalues, initVal=my_initial_guess)) exp(coef(mod2, what='mu')) coef(mod2, what='sigma') exp(coef(mod2, what='nu'))
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rOW(n=200, mu=0.2, sigma=4, nu=0.05) # Custom search region myvalues <- list(sigma="all(sigma > 1)", nu="all(nu < 1) & all(nu < 1)") my_initial_guess <- initValuesOW(formula=y~1) summary(my_initial_guess) # OW family modified with 'myOW_region' require(gamlss) myOW <- myOW_region(valid.values=myvalues, initVal=my_initial_guess) mod1 <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, sigma.start=param.startOW('sigma', my_initial_guess), nu.start=param.startOW('nu', my_initial_guess), control=gamlss.control(n.cyc=300, trace=FALSE), family=myOW) exp(coef(mod1, what='mu')) exp(coef(mod1, what='sigma')) exp(coef(mod1, what='nu')) # Example 2 # Same example using another link function and using 'myOW_region' # in the argument 'family' mod2 <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, sigma.start=2, nu.start=0.1, control=gamlss.control(n.cyc=300, trace=FALSE), family=myOW_region(family=OW(sigma.link='identity'), valid.values=myvalues, initVal=my_initial_guess)) exp(coef(mod2, what='mu')) coef(mod2, what='sigma') exp(coef(mod2, what='nu'))
The function OW()
defines the Odd Weibull distribution, a three parameter
distribution, for a gamlss.family
object to be used in GAMLSS fitting
using the function gamlss()
.
OW(mu.link = "log", sigma.link = "log", nu.link = "log")
OW(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu. |
The odd Weibull with parameters mu
, sigma
and nu
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a OW distribution in the gamlss()
function.
Jaime Mosquera Gutiérrez [email protected]
Cooray K (2006). “Generalization of the Weibull distribution: The odd Weibull family.” Statistical Modelling, 6(3), 265–277. ISSN 1471082X, doi:10.1191/1471082X06st116oa.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rOW(n=200, mu=0.1, sigma=7, nu = 1.1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family="OW", control=gamlss.control(n.cyc=500, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 500 x1 <- runif(n) x2 <- runif(n) x3 <- runif(n) mu <- exp(1.2 + 2 * x1) sigma <- 2.12 + 3 * x2 nu <- exp(0.2 - x3) x <- rOW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~x3, family=OW(sigma.link='identity'), control=gamlss.control(n.cyc=300, trace=FALSE)) coef(mod, what='mu') coef(mod, what='sigma') coef(mod, what='nu')
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rOW(n=200, mu=0.1, sigma=7, nu = 1.1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family="OW", control=gamlss.control(n.cyc=500, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 500 x1 <- runif(n) x2 <- runif(n) x3 <- runif(n) mu <- exp(1.2 + 2 * x1) sigma <- 2.12 + 3 * x2 nu <- exp(0.2 - x3) x <- rOW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~x3, family=OW(sigma.link='identity'), control=gamlss.control(n.cyc=300, trace=FALSE)) coef(mod, what='mu') coef(mod, what='sigma') coef(mod, what='nu')
This function can be used to extract initial values found with empirical
time on test transform (TTT) through initValuesOW
function.
This is used for parameter estimation in OW
distribution.
param.startOW(param, initValOW)
param.startOW(param, initValOW)
param |
a character used to specify the parameter required. It can take the
values |
initValOW |
an |
This function just gets initial values computed with initValuesOW
for OW
family. It must be called in sigma.start
and nu.start
arguments from gamlss
function. This function is useful only
if user want to set start values automatically with TTT plot.
See example for an illustration.
A length-one vector numeric value corresponding to the initial value of the
parameter specified in param
extracted from a initValuesOW
object specified in the initValOW
input argument.
Jaime Mosquera Gutiérrez [email protected]
# Random data generation (OW distributed) y <- rOW(n=500, mu=0.05, sigma=0.6, nu=2) # Initial values with TTT plot iv <- initValuesOW(formula = y ~ 1) summary(iv) # This data is from unimodal hazard # See TTT estimate from sample plot(iv, legend_options=list(pos=1.03)) # See the true hazard curve(hOW(x, mu=0.05, sigma=0.6, nu=2), to=100, lwd=3, ylab="h(x)") # Finally, we fit the model require(gamlss) con.out <- gamlss.control(n.cyc = 300, trace = FALSE) con.in <- glim.control(cyc = 300) (sigma.start <- param.startOW("sigma", iv)) (nu.start <- param.startOW("nu", iv)) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, control=con.out, i.control=con.in, family=myOW_region(OW(sigma.link="identity", nu.link="identity"), valid.values="auto", iv), sigma.start=sigma.start, nu.start=nu.start) # Estimates are close to actual values (mu <- exp(coef(mod, what = "mu"))) (sigma <- coef(mod, what = "sigma")) (nu <- coef(mod, what = "nu"))
# Random data generation (OW distributed) y <- rOW(n=500, mu=0.05, sigma=0.6, nu=2) # Initial values with TTT plot iv <- initValuesOW(formula = y ~ 1) summary(iv) # This data is from unimodal hazard # See TTT estimate from sample plot(iv, legend_options=list(pos=1.03)) # See the true hazard curve(hOW(x, mu=0.05, sigma=0.6, nu=2), to=100, lwd=3, ylab="h(x)") # Finally, we fit the model require(gamlss) con.out <- gamlss.control(n.cyc = 300, trace = FALSE) con.in <- glim.control(cyc = 300) (sigma.start <- param.startOW("sigma", iv)) (nu.start <- param.startOW("nu", iv)) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, control=con.out, i.control=con.in, family=myOW_region(OW(sigma.link="identity", nu.link="identity"), valid.values="auto", iv), sigma.start=sigma.start, nu.start=nu.start) # Estimates are close to actual values (mu <- exp(coef(mod, what = "mu"))) (sigma <- coef(mod, what = "sigma")) (nu <- coef(mod, what = "nu"))
Power Lindley distribution
PL(mu.link = "log", sigma.link = "log")
PL(mu.link = "log", sigma.link = "log")
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. |
The Power Lindley Distribution with parameters mu
and sigma
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a PL distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Ghitanya ME, Al-Mutairi DK, Balakrishnanb N, Al-Enezi LJ (2013). “Power Lindley distribution and associated inference.” Computational Statistics and Data Analysis, 64, 20–33. doi:10.1016/j.csda.2013.02.026.
# Example 1 # Generating some random values with # known mu and sigma y <- rPL(n=100, mu=1.5, sigma=0.2) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family= 'PL', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu and sigma # using the inverse link function exp(coef(mod, 'mu')) exp(coef(mod, 'sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(1.2 - 2 * x1) sigma <- exp(0.8 - 3 * x2) x <- rPL(n=n, mu, sigma) mod <- gamlss(x~x1, sigma.fo=~x2, family=PL, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
# Example 1 # Generating some random values with # known mu and sigma y <- rPL(n=100, mu=1.5, sigma=0.2) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family= 'PL', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu and sigma # using the inverse link function exp(coef(mod, 'mu')) exp(coef(mod, 'sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(1.2 - 2 * x1) sigma <- exp(0.8 - 3 * x2) x <- rPL(n=n, mu, sigma) mod <- gamlss(x~x1, sigma.fo=~x2, family=PL, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
The Quasi XGamma Poisson family
QXGP(mu.link = "log", sigma.link = "log", nu.link = "log")
QXGP(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Quasi XGamma Poisson distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
,
.
where
Returns a gamlss.family object which can be used to fit a QXGP distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Subhradev S, Mustafa C K, Haitham M Y (2018). “The Quasi XGamma-Poisson distribution: Properties and Application.” Istatistik: Journal of the Turkish Statistical Assocation, 11(3), 65–76. ISSN 1300-4077, https://dergipark.org.tr/en/pub/ijtsa/issue/42850/518206.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rQXGP(n=200, mu=4, sigma=2, nu=3) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='QXGP', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 2000 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-2.19 + 3 * x1) sigma <- exp(1 - 2 * x2) nu <- 1 x <- rQXGP(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=QXGP, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rQXGP(n=200, mu=4, sigma=2, nu=3) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='QXGP', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 2000 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-2.19 + 3 * x1) sigma <- exp(1 - 2 * x2) nu <- 1 x <- rQXGP(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=QXGP, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
Reflected Weibull distribution
RW(mu.link = "log", sigma.link = "log")
RW(mu.link = "log", sigma.link = "log")
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. |
The Reflected Weibull Distribution with parameters mu
and sigma
has density given by
for y < 0
Returns a gamlss.family object which can be used to fit a RW distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Clifford Cohen A (1973). “The Reflected Weibull Distribution.” Technometrics, 15(4), 867–873. doi:10.2307/1267396.
# Example 1 # Generating some random values with # known mu and sigma y <- rRW(n=100, mu=1, sigma=1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family= 'RW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu and sigma # using the inverse link function exp(coef(mod, 'mu')) exp(coef(mod, 'sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(1.5 - 1.5 * x1) sigma <- exp(2 - 2 * x2) x <- rRW(n=n, mu, sigma) mod <- gamlss(x~x1, sigma.fo=~x2, family=RW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
# Example 1 # Generating some random values with # known mu and sigma y <- rRW(n=100, mu=1, sigma=1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, family= 'RW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu and sigma # using the inverse link function exp(coef(mod, 'mu')) exp(coef(mod, 'sigma')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(1.5 - 1.5 * x1) sigma <- exp(2 - 2 * x2) x <- rRW(n=n, mu, sigma) mod <- gamlss(x~x1, sigma.fo=~x2, family=RW, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma")
initValOW
objectsThis summary
method displays initial values and search regions
for OW
family.
## S3 method for class 'initValOW' summary(object, ...)
## S3 method for class 'initValOW' summary(object, ...)
object |
an object of class |
... |
extra arguments |
No return value, it just prints out in the console the initial values and the
search regions for and
from OW distribution (see
dOW
).
Jaime Mosquera Gutiérrez [email protected]
The Sarhan and Zaindin's Modified Weibull distribution
SZMW(mu.link = "log", sigma.link = "log", nu.link = "log")
SZMW(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Sarhan and Zaindin's Modified Weibull distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
Returns a gamlss.family object which can be used to fit a SZMW distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Sarhan AM, Zaindin M (2009). “Modified Weibull distribution.” APPS. Applied Sciences, 11, 123–136.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rSZMW(n=100, mu = 1, sigma = 1, nu = 1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='SZMW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n) x2 <- runif(n) mu <- exp(-1.6 * x1) sigma <- exp(0.9 - 1 * x2) nu <- 1.5 x <- rSZMW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, mu.fo=~x1, sigma.fo=~x2, nu.fo=~1, family=SZMW, control=gamlss.control(n.cyc=50000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") coef(mod, what='nu')
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rSZMW(n=100, mu = 1, sigma = 1, nu = 1.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='SZMW', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n) x2 <- runif(n) mu <- exp(-1.6 * x1) sigma <- exp(0.9 - 1 * x2) nu <- 1.5 x <- rSZMW(n=n, mu, sigma, nu) mod <- gamlss(x~x1, mu.fo=~x1, sigma.fo=~x2, nu.fo=~1, family=SZMW, control=gamlss.control(n.cyc=50000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") coef(mod, what='nu')
The Weibull Geometric distribution
WG(mu.link = "log", sigma.link = "log", nu.link = "logit")
WG(mu.link = "log", sigma.link = "log", nu.link = "logit")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The weibull geometric distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
Returns a gamlss.family object which can be used to fit a WG distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Barreto-Souza W, de Morais AL, Cordeiro GM (2011). “The Weibull-geometric distribution.” Journal of Statistical Computation and Simulation, 81(5), 645–657.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rWG(n=100, mu = 0.9, sigma = 2, nu = 0.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='WG', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n) x2 <- runif(n) mu <- exp(- 0.2 * x1) sigma <- exp(1.2 - 1 * x2) nu <- 0.5 x <- rWG(n=n, mu, sigma, nu) mod <- gamlss(x~x1, mu.fo=~x1, sigma.fo=~x2, nu.fo=~1, family=WG, control=gamlss.control(n.cyc=50000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") coef(mod, what='nu')
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rWG(n=100, mu = 0.9, sigma = 2, nu = 0.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='WG', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 200 x1 <- runif(n) x2 <- runif(n) mu <- exp(- 0.2 * x1) sigma <- exp(1.2 - 1 * x2) nu <- 0.5 x <- rWG(n=n, mu, sigma, nu) mod <- gamlss(x~x1, mu.fo=~x1, sigma.fo=~x2, nu.fo=~1, family=WG, control=gamlss.control(n.cyc=50000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") coef(mod, what='nu')
The Weigted Generalized Exponential-Exponential family
WGEE(mu.link = "log", sigma.link = "log", nu.link = "log")
WGEE(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Weigted Generalized Exponential-Exponential distribution with parameters mu
,
sigma
and nu
has density given by
for ,
,
and
.
Returns a gamlss.family object which can be used to fit a WGEE distribution in the gamlss()
function.
Johan David Marin Benjumea, [email protected]
Mahdavi A (2015). “Two weighted distributions generated by exponential distribution.” Journal of Mathematical Extension, 9, 1–12.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rWGEE(n=1000, mu = 5, sigma = 0.5, nu = 1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='WGEE', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 500 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(2 - x1) sigma <- exp(1 - 3*x2) nu <- 1 x <- rWGEE(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=WGEE, control=gamlss.control(n.cyc=50000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rWGEE(n=1000, mu = 5, sigma = 0.5, nu = 1) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='WGEE', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 500 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(2 - x1) sigma <- exp(1 - 3*x2) nu <- 1 x <- rWGEE(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=WGEE, control=gamlss.control(n.cyc=50000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
The Weibull Poisson family
WP(mu.link = "log", sigma.link = "log", nu.link = "log")
WP(mu.link = "log", sigma.link = "log", nu.link = "log")
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. |
nu.link |
defines the nu.link, with "log" link as the default for the nu parameter. |
The Weibull Poisson distribution with parameters mu
,
sigma
and nu
has density given by
for x > 0.
Returns a gamlss.family object which can be used to fit a WP distribution in the gamlss()
function.
Amylkar Urrea Montoya, [email protected]
Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010.
Wanbo L, Daimin S (1967). “A new compounding life distribution: the Weibull–Poisson distribution.” Journal of Applied Statistics, 9(1), 21–38. doi:10.1080/02664763.2011.575126, https://doi.org/10.1080/02664763.2011.575126.
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rWP(n=300, mu=1.5, sigma=0.5, nu=0.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='WP', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 2000 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-1.3 + 3 * x1) sigma <- exp(0.69 - 2 * x2) nu <- 0.5 x <- rWP(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=WP, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))
# Example 1 # Generating some random values with # known mu, sigma and nu y <- rWP(n=300, mu=1.5, sigma=0.5, nu=0.5) # Fitting the model require(gamlss) mod <- gamlss(y~1, sigma.fo=~1, nu.fo=~1, family='WP', control=gamlss.control(n.cyc=5000, trace=FALSE)) # Extracting the fitted values for mu, sigma and nu # using the inverse link function exp(coef(mod, what='mu')) exp(coef(mod, what='sigma')) exp(coef(mod, what='nu')) # Example 2 # Generating random values under some model n <- 2000 x1 <- runif(n, min=0.4, max=0.6) x2 <- runif(n, min=0.4, max=0.6) mu <- exp(-1.3 + 3 * x1) sigma <- exp(0.69 - 2 * x2) nu <- 0.5 x <- rWP(n=n, mu, sigma, nu) mod <- gamlss(x~x1, sigma.fo=~x2, nu.fo=~1, family=WP, control=gamlss.control(n.cyc=5000, trace=FALSE)) coef(mod, what="mu") coef(mod, what="sigma") exp(coef(mod, what="nu"))