ks.gp.weibull: Test of Kolmogorov-Smirnov for the generalized power...

Description Usage Arguments Details Value References See Also Examples

View source: R/GPWeibull.R

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

1
2
ks.gp.weibull(x, alpha.est, theta.est, 
    alternative = c("less", "two.sided", "greater"), plot = FALSE, ...)

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.

Value

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

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

1
2
3
4
5
6
7
## 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)

Example output

	One-sample Kolmogorov-Smirnov test

data:  x
D = 0.13287, p-value = 0.3912
alternative hypothesis: two-sided

Warning message:
In ks.test(x, pgp.weibull, alpha, theta, alternative = alternative) :
  ties should not be present for the Kolmogorov-Smirnov test

reliaR documentation built on May 1, 2019, 9:51 p.m.

Related to ks.gp.weibull in reliaR...