Learn R Programming

lmomco (version 2.4.14)

hlmomco: 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 \(\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.

Usage

hlmomco(x,para)

Value

Hazard rate for x.

Arguments

x

A real value vector.

para

The parameters from lmom2par or similar.

Author

W.H. Asquith

References

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

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