Skip to contents

Performs the Lilliefors normality test, which is an empirical distribution function (EDF)-based goodness-of-fit test derived from the Kolmogorov–Smirnov test, using the approximation proposed by Molin and Abdi (1998).

Usage

Lilliefors_test(x, alpha = 0.05, silent = FALSE, summary = TRUE, misc = FALSE)

Arguments

x

A numeric vector, at least length of 8.

alpha

Numeric (default: 0.05). Significance threshold, range from 0 to 1.

silent

Logical (default: FALSE). If FALSE, print out the results.

summary

Logical (default: TRUE). Produce a summary table.

misc

Logical (default: FALSE). Output other unimportant parameters.

Value

A list.

References

Molin, P., Abdi, H., 1998. New tables and numerical approximation for the Kolmogorov-Smirnov/Lillierfors/Van Soest test of normality. Technical report, University of Bourgogne.

Examples

out <- Lilliefors_test(rnorm(10))
#> 
#> --------------------------
#> Lilliefors normality test 
#> 
#> Statistic (D) = 0.2175 
#> p-value = 0.19418
#> --------------------------
print(out$summary)
#>                alpha statistic      pval signif standard_value critical_value
#> Lilliefors (D)  0.05 0.2174734 0.1941795     ns             NA        0.26338
#>                SE CI_lower CI_upper  N       AVG      MED        MIN      MAX
#> Lilliefors (D) NA       NA       NA 10 0.4441928 0.309358 -0.5282641 2.039369
#>                       SD
#> Lilliefors (D) 0.7651039