Learn R Programming

reliaR (version 0.2)

ks.gp.weibull: Test of Kolmogorov-Smirnov for the generalized power Weibull(GPW) distribution

Description

The function ks.gp.weibull() gives the values for the KS test assuming a generalized power Weibull(GPW) with shape parameter alpha and scale parameter theta. 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.gp.weibull(x, alpha.est, theta.est, 
    alternative = c("less", "two.sided", "greater"), plot = FALSE, ...)

Value

The function ks.gp.weibull() carries out the KS test for the generalized power Weibull(GPW)

Arguments

x

vector of observations.

alpha.est

estimate of the parameter alpha

theta.est

estimate of the parameter theta

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

Nikulin, M. and Haghighi, F. (2006). A Chi-squared test for the generalized power Weibull family for the head-and-neck cancer censored data, Journal of Mathematical Sciences, Vol. 133(3), 1333-1341.

Pham, H. and Lai, C.D. (2007). On recent generalizations of the Weibull distribution, IEEE Trans. on Reliability, Vol. 56(3), 454-458.

See Also

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

Examples

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

ks.gp.weibull(repairtimes, 1.566093, 0.355321, alternative = "two.sided", plot = TRUE)

Run the code above in your browser using DataLab