ksbs {bs}R Documentation

Test of Kolmogorov-Smirnov for the Birnbaum-Saunders distribution

Description

The function ksbs() gives the values for the KS test assuming an BSD with shape parameter alpha and scale parameter beta. In addition, optionally, this function allows one to show a comparative graph between the empirical and theoretical cdfs for a specified data set.

Usage

ksbs(x, alternative = c("less", "two.sided", "greater"), plot = FALSE)

Arguments

x Vector of observations.
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.

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

Author(s)

Víctor Leiva <victor.leiva@uv.cl>, Hugo Hernández <hugo.hernande@msn.com>, and Marco Riquelme <mriquelm@ucm.cl>.

Examples

## Load data sets
data(psi31)
sample<-psi31

## KS test for psi31
ksbs(sample,plot=FALSE,alternative="two.sided")

[Package bs version 1.0 Index]