ks.gumbel: Test of Kolmogorov-Smirnov for the Gumbel distribution

View source: R/Gumbel.R

ks.gumbelR Documentation

Test of Kolmogorov-Smirnov for the Gumbel distribution

Description

The function ks.gumbel() gives the values for the KS test assuming a Gumbel with shape parameter mu and scale parameter sigma. 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.gumbel(x, mu.est, sigma.est, 
    alternative = c("less", "two.sided", "greater"), plot = FALSE, ...)

Arguments

x

vector of observations.

mu.est

estimate of the parameter mu

sigma.est

estimate of the parameter sigma

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.gumbel() carries out the KS test for the Gumbel

References

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

See Also

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

Examples

## Load data sets
data(dataset2)
## Maximum Likelihood(ML) Estimates of mu & sigma for the data(dataset2)
## Estimates of mu & sigma using 'maxLik' package
## mu.est = 212.157, sigma.est = 151.768

ks.gumbel(dataset2, 212.157, 151.768, alternative = "two.sided", plot = TRUE)

reliaR documentation built on Nov. 5, 2025, 6:57 p.m.

Related to ks.gumbel in reliaR...