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

Description Usage Arguments Details Value References See Also Examples

View source: R/Gumbel.R

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

1
2
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

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

Example output

	One-sample Kolmogorov-Smirnov test

data:  x
D = 0.069896, p-value = 0.6501
alternative hypothesis: two-sided

Warning message:
In ks.test(x, pgumbel, mu, sigma, alternative = alternative) :
  ties should not be present for the Kolmogorov-Smirnov test

reliaR documentation built on May 29, 2017, 12:34 p.m.

Related to ks.gumbel in reliaR...