| hweibull {eha} | R Documentation |
Calculates the hazard function of a Weibull distribution.
hweibull(x, shape, scale = 1, log = FALSE)
x |
vector of quantiles |
shape |
The shape parameter |
scale |
The scale parameter, defaults to 1. |
log |
logical; if TRUE, the log of the hazard function is given. |
See dweibull.
The hazard function, evaluated at x.
Göran Broström
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function(x, shape, scale = 1, log = FALSE){
if (shape <= 0 || scale <= 0)
error("scale and shape must be positive")
(x / scale)^(shape - 1) / scale
}