ks.gompertz: Test of Kolmogorov-Smirnov for the Gompertz distribution

Description Usage Arguments Details Value References See Also Examples

View source: R/Gompertz.R

Description

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

Arguments

x

vector of observations.

alpha.est

estimate of the parameter alpha

theta.est

estimate of the parameter theta

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

References

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

See Also

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

Examples

1
2
3
4
5
6
7
## Load data sets
data(sys2)
## Maximum Likelihood(ML) Estimates of alpha & theta for the data(sys2)
## Estimates of alpha & theta using 'maxLik' package
## alpha.est = 0.00121307, theta.est = 0.00173329

ks.gompertz(sys2, 0.00121307, 0.00173329, alternative = "two.sided", plot = TRUE)

Example output

	One-sample Kolmogorov-Smirnov test

data:  x
D = 0.061954, p-value = 0.8756
alternative hypothesis: two-sided

reliaR documentation built on May 1, 2019, 9:51 p.m.

Related to ks.gompertz in reliaR...