ks.inv.genexp: Test of Kolmogorov-Smirnov for the Inverse Generalized...

Description Usage Arguments Details Value References See Also Examples

View source: R/InvGenExp.R

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

1
2
ks.inv.genexp(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.

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.inv.genexp() carries out the KS test for the Inverse Generalized Exponential(IGE)

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

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

Example output

	One-sample Kolmogorov-Smirnov test

data:  x
D = 0.094017, p-value = 0.8109
alternative hypothesis: two-sided

Warning message:
In ks.test(x, pinv.genexp, alpha, lambda, 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.inv.genexp in reliaR...