Learn R Programming

reliaR (version 0.2)

ks.inv.genexp: Test of Kolmogorov-Smirnov for the Inverse Generalized Exponential(IGE) distribution

Description

The function ks.inv.genexp() gives the values for the KS test assuming a Inverse Generalized Exponential(IGE) 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.inv.genexp(x, alpha.est, lambda.est, 
    alternative = c("less", "two.sided", "greater"), plot = FALSE, ...)

Value

The function ks.inv.genexp() carries out the KS test for the Inverse Generalized Exponential(IGE)

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

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. (2007). Generalized exponential distribution: Existing results and some recent development, Journal of Statistical Planning and Inference. 137, 3537-3547.

See Also

pp.inv.genexp for PP plot and qq.inv.genexp for QQ plot

Examples

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

ks.inv.genexp(repairtimes, 1.097807, 1.206889, alternative = "two.sided", plot = TRUE)

Run the code above in your browser using DataLab