KSLTest | R Documentation |
This function computes the Lilliefors variant of the one-sample Kolmogorov-Smirnov test.
KSLTest(data, alpha = 0.05, j = 1, warn = T)
data |
The data of a univariate distribution for which the test statistic is computed (vector) |
alpha |
The two-sided decision threshold used for hypothesis-testing (scalar) |
j |
The # hypotheses tested; used to compute a Bonferonni correction, if applicable; should remain at its default if multiple testing is not an issue (scalar) |
warn |
Used for printing a warning message when negative values are imputed to 0.0 (boolean) |
Molin & Abdi's (1998) algorithmic approximation of p-values is used for hypothesis-testing. Note that this algorithm requires the imputation of 0.0 for negative output when p-values would otherwise be low in value (< 0.001) using other methods. A similar issue with extremely large values requires the imputation of 1.0 for values larger than 1.0 when p > .99.
An object including the test statistic, p-value, and a significance flag (list)
Lilliefors, H.W. (1967). On the Kolmogorov-Smirnov Test for Normality with Mean and Variance Unknown. Journal of the American Statistical Association, 62, 399-402.
Molin, P., & Abdi, H. (1998). New Tables and numerical approximation for the KolmogorovSmirnov/Lillierfors/Van Soest test of normality.
values <- rnorm(100) x <- KSLTest(data = values)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.