ksigt {ig} | R Documentation |
The function ksigt
gives the values for the Kolmogorov-Smirnov (KS)
test assuming an IGTD with parameters mu, lambda 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.
ksigt(x, kernel = "normal", graph = FALSE, mainTitle = "Cumulative distribution function", xLabel = "data", yLabel = "cdf")
x |
Vector of observations. |
kernel |
Kernel of the pdf of the associated symmetrical distribution
by means of which the IGTD 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. |
The Kolmogorov-Smirnov test is a goodness-of-fit technique based on the maximum distance between the empirical and theoretical cdfs.
The function ksigt()
carries out de Kolmogorov-Smirnov test for the IGTD.
Víctor Leiva <victor.leiva@uv.cl; victor.leiva@yahoo.com>,
Hugo Hernández <hugo.hernandez.p@gmail.com> and
Antonio Sanhueza <asanhueza@ufro.cl>.
Sanhueza, A., Leiva, V., Balakrishnan, N. (2008). A new class of inverse Gaussian type distributions. Metrika (in press).
## Generates a sample from the IGTD with normal kernel x <- rigt(300, mu = 1.0, lambda = 1.0, kernel = "normal") ## Produces a KS test abd produces a graph for the IGTD with normal kernel ksigt(x, kernel = "normal", graph = TRUE, xLabel = "Data", yLabel = "Cumulative distribution function")