GMW: The Generalized modified Weibull Distribution

Description Usage Arguments Details Value Examples

Description

Density, distribution function, quantile function, random generation and hazard function for the generalized modified weibull distribution with parameters beta, theta, gamma and lambda.

Usage

1
2
3
4
5
6
7
8
9
dGMW(y, beta, theta, gamma, lambda, log = FALSE)

pGMW(q, beta, theta, gamma, lambda, lower.tail = TRUE, log.p = FALSE)

qGMW(p, beta, theta, gamma, lambda, lower.tail = TRUE, log.p = FALSE)

rGMW(n, beta, theta, gamma, lambda)

hGMW(x, beta, theta, gamma, lambda, log = FALSE)

Arguments

beta

parameter one.

theta

parameter two.

gamma

parameter three.

lambda

parameter four.

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.

x,q

vector of quantiles.

Details

The generalized modified weibull with parameters beta, theta, gamma and lambda has density given by

f(x)= beta*theta*x^(gamma-1)*(gamma+lambda*x)*exp(lambda*x-beta*x^(gamma)*exp(lambda*x))* (1-exp(beta*x^(gamma)*exp(lambda*x)))^(theta-1)

for x>0.

#'

Value

dGMW gives the density, pGMW gives the distribution function, qGMW gives the quantile function, rGMW generates random deviates and hGMW gives the hazard function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## The probability density function
curve(dGMW(x, beta = 2, theta = 0.5, gamma = 2, lambda = 1.5), from = 0, to = 0.8, ylim = c(0, 6), col = "red", las = 1, ylab = "The probability density function")

## The cumulative distribution and the Reliability function
par(mfrow = c(1, 2))
curve(pGMW(x, beta = 2, theta = 0.5, gamma = 2, lambda = 1.5), from = 0, to = 1.2, col = "red", las = 1, ylab = "The cumulative distribution function")
curve(pGMW(x, beta = 2, theta = 0.5, gamma = 2, lambda = 1.5, lower.tail = FALSE), from = 0, to = 1.2, col = "red", las = 1, ylab = "The Reliability function")
## The quantile function
p <- seq(from = 0, to = 0.99999, length.out = 100)
plot(x = qGMW(p, beta = 2, theta = 0.5, gamma = 2, lambda = 0.3), y = p, xlab = "Quantile", las = 1, ylab = "Probability")
curve(pGMW(x, beta = 2, theta = 0.5, gamma = 2, lambda = 0.3),  from = 0, add = TRUE, col="red")

## The random function
hist(rGMW(n = 1000, beta = 2, theta = 0.5, gamma = 2,lambda = 0.3), freq = FALSE, xlab = "x", main ="", las = 1)
curve(dGMW(x, beta = 2, theta = 0.5, gamma = 2, lambda = 0.3),  from = 0, add = TRUE, col = "red")

## The Hazard function
curve(hGMW(x, beta = 2, theta = 1.5, gamma = 2, lambda = 0.8), from = 0, to = 1, ylim = c(0, 16), col = "red", ylab = "The Hazard function", las = 1)

ousuga/reldist documentation built on May 24, 2019, 5:54 p.m.