ks.logis.rayleigh: Test of Kolmogorov-Smirnov for the Logistic-Rayleigh(LR)...

Description Usage Arguments Details Value References See Also Examples

View source: R/LogisRayleigh.R

Description

The function ks.logis.rayleigh() gives the values for the KS test assuming a Logistic-Rayleigh(LR) 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.logis.rayleigh(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.logis.rayleigh() carries out the KS test for the Logistic-Rayleigh(LR)

References

Lan, Y. and Leemis, L. M. (2008). The Logistic-Exponential Survival Distribution, Naval Research Logistics, 55, 252-264.

See Also

pp.logis.rayleigh for PP plot and qq.logis.rayleigh for QQ plot

Examples

1
2
3
4
5
6
7
8
## Load data sets
data(stress)
## Maximum Likelihood(ML) Estimates of alpha & lambda for the data(stress)
## Estimates of alpha & lambda using 'maxLik' package
## alpha.est = 1.4779388, lambda.est = 0.2141343

ks.logis.rayleigh(stress, 1.4779388, 0.2141343, 
    alternative = "two.sided", plot = TRUE)

Example output

	One-sample Kolmogorov-Smirnov test

data:  x
D = 0.073246, p-value = 0.6567
alternative hypothesis: two-sided

Warning message:
In ks.test(x, plogis.rayleigh, 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.