Learn R Programming

reliaR (version 0.01)

ks.loglog: Test of Kolmogorov-Smirnov for the Loglog distribution

Description

The function ks.loglog() gives the values for the KS test assuming the Loglog distribution 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

ks.loglog(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.

Value

The function ks.loglog() carries out the KS test for the Loglog.

Details

The Kolmogorov-Smirnov test is a goodness-of-fit technique based on the maximum distance between the empirical and theoretical cdfs.

References

Pham, H.(2002). A Vtub-Shaped Hazard Rate Function with Applications to System Safety, International Journal of Reliability and Applications, Vol. 3, No. l, pp. 1-16.

Pham, H.(2006). System Software Reliability, Springer-Verlag.

See Also

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

Examples

Run this code
## Load data sets
data(sys2)
## Maximum Likelihood(ML) Estimates of alpha & lambda for the data(sys2)
## alpha.est = 0.9058689 lambda.est = 1.0028228

ks.loglog(sys2, 0.9058689, 1.0028228, alternative = "two.sided", plot = TRUE)  

Run the code above in your browser using DataLab