Description Usage Arguments Details Value Examples
Density, distribution function, quantile function ,
random generation and hazard function for the generalized power weibull distribution with
parameters alpha
, theta
and lambda
.
1 2 3 4 5 6 7 8 9 |
x,q |
vector of quantiles. |
alpha |
parameter one. |
theta |
parameter two. |
lambda |
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 generalized power weibull with parameters alpha
, theta
and lambda
has density given by
f(x) = alpha*theta*lambda^(-1)*x^(theta-1)*(1+alpha*(x^theta))^(1/lambda-1)*exp(1-(1+alpha*(x^theta))^(1/lambda))
for x > 0.
dGPW
gives the density, pGPW
gives the distribution
function, qGPW
gives the quantile function, rGPW
generates random deviates and hGPW
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(dGPW(x, alpha = 0.5, theta = 0.5, lambda = 0.25), from = 0, to = 2.5, ylim = c(0, 3), col = "red", las = 1, ylab = "The probability density function")
## The cumulative distribution and the Reliability function
par(mfrow = c(1, 2))
curve(pGPW(x, alpha = 0.5, theta = 0.5, lambda = 0.25), from = 0, to = 2.5, col = "red", las = 1, ylab = "The cumulative distribution function")
curve(pGPW(x, alpha = 0.5, theta = 0.5, lambda = 0.25, lower.tail = FALSE), from = 0, to = 2.5, col = "red", las = 1, ylab = "The Reliability function")
## The quantile function
p <- seq(from = 0, to = 0.99999, length.out = 100)
plot(x = qGPW(p, alpha = 0.5, theta = 0.5, lambda = 0.25), y = p, xlab = "Quantile", las = 1, ylab = "Probability")
curve(pGPW(x, alpha = 0.5, theta = 0.5, lambda = 0.25), from = 0, add = TRUE, col = "red")
## The random function
hist(rGPW(n = 10000, alpha = 0.5, theta = 0.5, lambda = 0.25), freq = FALSE, xlab = "x", las = 1, main = "")
curve(dGPW(x, alpha = 0.5, theta = 0.5, lambda = 0.25), from = 0, add = TRUE, col = "red")
## The Hazard function
curve(hGPW(x, alpha = 0.5, theta = 0.5, lambda = 0.25), from = 0, to = 6, ylim = c(0, 13), col = "red", las = 1, ylab = "The Hazard function")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.