ksgbs {gbs}R Documentation

Test of Kolmogorov-Smirnov for the GBSD

Description

The function {ksgbs} gives the values for the Kolmogorov-Smirnov (KS) test assuming a GBSD with parameters α, β and an specific kernel. In addition, optionally, this function allows one to obtain a comparative graph between the empirical and theoretical cdfs for a given data set.

Usage

  ksgbs(x, kernel = "normal", graph = FALSE, 
        mainTitle = "Cumulative distribution function", xLabel = "data", 
        yLabel = "cdf")

Arguments

x Vector of observations.
kernel Kernel of the pdf of the associated symmetrical distribution by means of which the GBSD is obtained. The kernels: {"laplace"}, {"logistic"}, {"normal"} and {"t"} are available.
graph Logical; if TRUE (default), the cdf plot is provided.
mainTitle Main title of the graph.
xLabel A title for the x axis.
yLabel A title for the y axis.

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 {ksgbs()} carries out de Kolmogorov-Smirnov test for the GBSD.

Author(s)

Barros, Michelli <michelli.karinne@gmail.com>
Leiva, Victor <victor.leiva@uv.cl, victor.leiva@yahoo.com>
Paula, Gilberto A. <giapaula@ime.usp.br>

References

Diaz-Garcia, J.A., Leiva, V. (2005) A new family of life distributions based on elliptically contoured distributions. J. Stat. Plan. Infer. 128:445-457 (Erratum: J. Stat. Plan. Infer. 137:1512-1513).

Leiva, V., Barros, M., Paula, G.A., Sanhueza, A. (2008) Generalized Birnbaum-Saunders distributions applied to air pollutant concentration. Environmetrics 19:235-249.

Sanhueza, A., Leiva, V., Balakrishnan, N. (2008) The generalized Birnbaum-Saunders distribution and its theory, methodology and application. Comm. Stat. Theory and Meth. 37:645-670.

Examples

## Generates a sample from the GBSD with normal kernel 
x <- rgbs(300, alpha = 1.0, beta = 1.0,  nu = 1.0, kernel = "normal")

## Produces a KS test abd produces a graph for the GBSD with normal kernel
  ksgbs(x, kernel = "normal", graph = TRUE, xLabel = "Data",
        yLabel = "Cumulative distribution function")

[Package gbs version 1.0 Index]