hlmomco | R Documentation |
This function acts as a front end to dlmomco
and plmomco
to compute the hazard function h(x)
or conditional failure rate. The function is defined by
h(x) = \frac{f(x)}{1 - F(x)}\mbox{,}
where f(x)
is a probability density function and F(x)
is the cumulative distribution function.
To help with intuitive understanding of what h(x)
means (Ugarte and others, 2008), let \mathrm{d}x
represent a small unit of measurement. Then the quantity h(x)\,\mathrm{d}x
can be conceptualized as the approximate probability that random variable X
takes on a value in the interval [x, x+\mathrm{d}x]
.
Ugarte and others (2008) continue by stating that h(x)
represents the instantaneous rate of death or failure at time x
, given the survival to time x
has occurred. Emphasis is needed that h(x)
is a rate of probability change and not a probability itself.
hlmomco(x,para)
x |
A real value vector. |
para |
The parameters from |
Hazard rate for x
.
The hazard function is numerically solved for the given cumulative distribution and probability density functions and not analytical expressions for the hazard function that do exist for many distributions.
W.H. Asquith
Ugarte, M.D., Militino, A.F., and Arnholt, A.T., 2008, Probability and statistics with R: CRC Press, Boca Raton, FL.
plmomco
, dlmomco
my.lambda <- 100
para <- vec2par(c(0,my.lambda), type="exp")
x <- seq(40:60)
hlmomco(x,para) # returns vector of 0.01
# because the exponential distribution has a constant
# failure rate equal to 1/scale or 1/100 as in this example.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.