Learn R Programming

reliaR (version 0.2)

ks.moee: Test of Kolmogorov-Smirnov for the Marshall-Olkin Extended Exponential(MOEE) distribution

Description

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

Value

The function ks.moee() carries out the KS test for the MOEE

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

Marshall, A. W., Olkin, I. (1997). A new method for adding a parameter to a family of distributions with application to the exponential and Weibull families. Biometrika,84(3):641-652.

Marshall, A. W., Olkin, I.(2007). Life Distributions: Structure of Nonparametric, Semiparametric, and Parametric Families. Springer, New York.

See Also

pp.moee for PP plot and qq.moee for QQ plot

Examples

Run this code
## Load dataset
data(stress)
## Estimates of alpha & lambda using 'maxLik' package
## alpha.est = 75.67982, lambda.est = 1.67576

ks.moee(stress, 75.67982, 1.67576, alternative = "two.sided", plot = TRUE)

Run the code above in your browser using DataLab