Learn R Programming

reliaR (version 0.01)

ks.flex.weibull: Test of Kolmogorov-Smirnov for the flexible Weibull(FW) distribution

Description

The function ks.flex.weibull() gives the values for the KS test assuming a flexible Weibull(FW) 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.flex.weibull(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.flex.weibull() carries out the KS test for the flexible Weibull(FW)

Details

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

References

Bebbington, M., Lai, C.D. and Zitikis, R. (2007). A flexible Weibull extension, Reliability Engineering and System Safety, 92, 719-726.

See Also

pp.flex.weibull for PP plot and qq.flex.weibull for QQ plot

Examples

Run this code
## Load data sets
data(repairtimes)
## Maximum Likelihood(ML) Estimates of alpha & beta for the data(repairtimes)
## Estimates of alpha & beta using 'maxLik' package
## alpha.est = 0.07077507, beta.est = 1.13181535

ks.flex.weibull(repairtimes, 0.07077507, 1.13181535, 
    alternative = "two.sided", plot = TRUE)

Run the code above in your browser using DataLab