Learn R Programming

reliaR (version 0.2)

ks.exp.ext: Test of Kolmogorov-Smirnov for the Exponential Extension(EE) distribution

Description

The function ks.exp.ext() gives the values for the KS test assuming a Exponential Extension(EE) with shape parameter alpha and scale parameter lambda. 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.exp.ext(x, alpha.est, lambda.est, 
    alternative = c("less", "two.sided", "greater"), plot = FALSE, ...)

Value

The function ks.exp.ext() carries out the KS test for the Exponential Extension(EE)

Arguments

x

vector of observations.

alpha.est

estimate of the parameter alpha

lambda.est

estimate of the parameter lambda

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.

See Also

pp.exp.ext for PP plot and qq.exp.ext for QQ plot

Examples

Run this code
## Load data sets
data(sys2)
## Maximum Likelihood(ML) Estimates of alpha & lambda for the data(sys2)
## Estimates of alpha & lambda using 'maxLik' package
## alpha.est = 1.0126e+01, lambda.est = 1.5848e-04

ks.exp.ext(sys2, 1.0126e+01, 1.5848e-04, alternative = "two.sided", plot = TRUE)

Run the code above in your browser using DataLab