Learn R Programming

reliaR (version 0.01)

ks.gen.exp: Test of Kolmogorov-Smirnov for the Generalized Exponential(GE) distribution

Description

The function ks.gen.exp() gives the values for the KS test assuming an GE 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.gen.exp(x, alpha.est, lambda.est, alternative = c("less", "two.sided", "greater"), plot = FALSE, ...)

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.

Value

The function ks.gen.exp() carries out the KS test for the GE.

Details

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

References

Gupta, R. D. and Kundu, D. (2001). Exponentiated exponential family; an alternative to gamma and Weibull distributions. Biometrical Journal, 43(1), 117 - 130.

Gupta, R. D. and Kundu, D. (1999). Generalized exponential distributions. Australian and New Zealand Journal of Statistics, 41(2), 173 - 188.

See Also

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

Examples

Run this code
## Load data sets
data(bearings)
## Estimates of alpha & lambda using 'maxLik' package
## alpha.est = 5.28321139, lambda.est = 0.03229609
ks.gen.exp(bearings, 5.28321139, 0.03229609, alternative = "two.sided", plot = TRUE)

Run the code above in your browser using DataLab