
Lilliefors test for normality with the Dallal-Wilkinson p-value
Source:R/LillieforsNormality.R
lilef.RdThe Kolmogorov-Smirnov distance to the normal distribution function with
the sample mean and standard deviation plugged in, \(D = \max(D^+,
D^-)\). Because the two parameters are estimated, the null distribution of
\(D\) is not Kolmogorov's; the p-value is the Dallal and Wilkinson (1986)
analytic approximation below 0.1 and Stephens' (1974) modified statistic
\((\sqrt n - 0.01 + 0.85/\sqrt n) D\) above it, as in
nortest::lillie.test. Identical to the Python arm
morie.fn.lilef.lilef.
Value
A list with statistic, p_value,
critical_value (Lilliefors' large-sample 5 percent point
0.886/sqrt(n)), interpretation ("reject" when the p-value
is below 0.05), mean and std.
References
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.
Dallal, G. E. and Wilkinson, L. (1986). An analytic approximation to the distribution of Lilliefors's test statistic for normality. The American Statistician 40, 294-296.
Stephens, M. A. (1974). EDF statistics for goodness of fit and some comparisons. Journal of the American Statistical Association 69, 730-737.
Examples
lilef(c(2.1, 3.4, 1.9, 5.6, 2.8, 3.1, 9.9, 2.5, 3.3, 2.7))$p_value
#> [1] 0.0008043292