Learn R Programming

reliaR (version 0.2)

ks.weibull.ext: Test of Kolmogorov-Smirnov for the Weibull Extension(WE) distribution

Description

The function ks.weibull.ext() gives the values for the KS test assuming a Weibull Extension(WE) 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.weibull.ext(x, alpha.est, beta.est, 
    alternative = c("less", "two.sided", "greater"), plot = FALSE, ...)

Value

The function ks.weibull.ext() carries out the KS test for the Weibull Extension(WE)

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.

Details

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

References

Tang, Y., Xie, M. and Goh, T.N., (2003). Statistical analysis of a Weibull extension model, Communications in Statistics: Theory & Methods 32(5):913-928.

Zhang, T., and Xie, M.(2007). Failure Data Analysis with Extended Weibull Distribution, Communications in Statistics-Simulation and Computation, 36(3), 579-592.

See Also

pp.weibull.ext for PP plot and qq.weibull.ext 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 = 0.00019114, beta.est = 0.14696242

ks.weibull.ext(sys2, 0.00019114, 0.14696242, alternative = "two.sided", plot = TRUE)

Run the code above in your browser using DataLab