Description Usage Arguments Details Value Examples
Density, distribution function, quantile function,
random generation and hazard function for the kumaraswamy modified weibull distribution with
parameters alpha
, theta
, lambda
, a
and b
.
1 2 3 4 5 6 7 8 9 |
x,q |
vector of quantiles. |
alpha |
parameter one. |
lambda |
parameter three. |
a |
parameter four. |
b |
parameter five. |
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. |
beta |
parameter two. |
The kumaraswamy modified weibull with parameters alpha
, theta
,
lambda
, a
and b
has density given by
f(x)=a*b*alpha*x^(theta-1)*(theta+lambda*x)*exp(lambda*x-alpha*x^(theta)*exp(lambda*x))* (1-exp(-alpha*x^theta*exp(lambda*x)))^(a-1)* (1-(1-exp(-aplha*x^theta*exp(lambda*x)))^a)^(b-1)
for x>0.
dKMW
gives the density, pKMW
gives the distribution
function, qKMW
gives the quantile function, rKMW
generates random deviates and hKMW
gives the hazard function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## The probability density function
curve(dKMW(x, alpha = 1, theta = 0.6, lambda = 2, a = 2, b = 1.2), from = 0, to = 3, ylim = c(0, 2), col = "red", las = 1, ylab = "The probability density function")
## The cumulative distribution and the Reliability function
par(mfrow = c(1, 2))
curve(pKMW(x, alpha = 1, theta = 0.6, lambda = 2, a = 2, b = 1.2), from = 0, to = 3, col = "red", las = 1, ylab = "The cumulative distribution function")
curve(pKMW(x, alpha = 1, theta = 0.6, lambda = 2, a = 2, b = 1.2, lower.tail=FALSE), from = 0, to = 3, col = "red", las = 1, ylab = "The Reliability function")
## The quantile function
p <- seq(from = 0, to = 0.99999, length.out = 100)
plot(x = qKMW(p, alpha = 1, theta = 0.6, lambda = 2, a = 2, b = 1.2), y = p, xlab = "Quantile", las = 1, ylab = "Probability")
curve(pKMW(x, alpha = 1, theta = 0.6, lambda = 2, a = 2, b = 1.2), from = 0, add = TRUE, col = "red")
## The random function
hist(rKMW(n = 1000,alpha = 1, theta = 0.6, lambda = 2, a = 2, b = 1.2), freq = FALSE, ylim = c(0, 2), xlab = "x", las = 1, main = "")
curve(dKMW(x, alpha = 1, theta = 0.6, lambda = 2, a = 2, b = 1.2), from = 0, to = 3, add = TRUE, col = "red")
## The Hazard function
curve(hKMW(x, alpha = 1, theta = 0.6, lambda = 2, a = 2, b = 1.2), from = 0, to = 1, ylim = c(0, 10), col = "red", ylab = "The Hazard function", las = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.