Learn R Programming

reliaR (version 0.01)

ks.lfr: Test of Kolmogorov-Smirnov for the linear failure rate(LFR) distribution

Description

The function ks.lfr() gives the values for the KS test assuming a linear failure rate(LFR) with shape parameter alpha and scale parameter beta. In addition, optionally, this function allows one to show a comparative graph between the empirical and theoretical cdfs for a specified data set.

Usage

ks.lfr(x, alpha.est, beta.est, alternative = c("less", "two.sided", "greater"), plot = FALSE, ...)

Arguments

x
vector of observations.
alpha.est
estimate of the parameter alpha
beta.est
estimate of the parameter beta
alternative
indicates the alternative hypothesis and must be one of "two.sided" (default), "less", or "greater".
plot
Logical; if TRUE, the cdf plot is provided.
...
additional arguments to be passed to the underlying plot function.

Value

ks.lfr() carries out the KS test for the linear failure rate(LFR)

Details

The Kolmogorov-Smirnov test is a goodness-of-fit technique based on the maximum distance between the empirical and theoretical cdfs.

References

Bain, L.J. (1974). Analysis for the Linear Failure-Rate Life-Testing Distribution, Technometrics, 16(4), 551 - 559.

Lawless, J.F. (2003). Statistical Models and Methods for Lifetime Data, John Wiley and Sons, New York.

Sen, A. and Bhattacharya, G.K. (1995). Inference procedure for the linear failure rate mode, Journal of Statistical Planning and Inference, 46, 59-76.

See Also

pp.lfr for PP plot and qq.lfr for QQ plot

Examples

Run this code
## Load data sets
data(sys2)
## Maximum Likelihood(ML) Estimates of alpha & beta for the data(sys2)
## Estimates of alpha & beta using 'maxLik' package
## alpha.est = 1.77773e-03,  beta.est = 2.77764e-06

ks.lfr(sys2, 1.777673e-03, 2.777640e-06, alternative = "two.sided", plot = TRUE)

Run the code above in your browser using DataLab