Learn R Programming

lmomco (version 1.4.3)

hmomco: Hazard Functions of the Distributions

Description

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 $dx$ represent a small unit of measurement. Then the quantity $h(x)dx$ can be conceptualized as the approximate probability that random variable $X$ takes on a value in the interval $[x, x+dx]$.

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.

Usage

hlmomco(x,para)

Arguments

x
A real value.
para
The parameters from lmom2par or similar.

Value

  • Hazard rate for x.

References

Ugarte, M.D., Militino, A.F., and Arnholt, A.T., 2008, Probability and statistics with R: Boca Raton, FL., CRC Press, 700 p.

See Also

plmomco, dlmomco

Examples

Run this code
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.

Run the code above in your browser using DataLab