View source: R/math.normality.R
normal.test | R Documentation |
Test if a sample is normal or not based on the best available test, the default is Shapiro-Wilks but if conditions are not met then Lilliefor's correction for Kolmogorov-Smirnof is used instead
normal.test( x, x.name = NULL, digits = 2, p.sig = 0.05, p.sig.small = 0.01, p.sig.very.small = 0.001, stop.on.error = TRUE, show.error = TRUE, DEBUG = FALSE )
x |
vector with numeric data. |
digits |
sumber of decimal values (default = 2). |
p.sig |
p value under witch we consider the test statistically significant (default = 0.05). |
p.sig.small |
p value defined as "small" (default = 0.01). |
p.sig.very.small |
p value defined as "very small", this value will be some times represented as p<0.001 (default = 0.001). |
stop.on.error |
if the function should stop on errors or just print them and go on (default=TRUE). |
show.error |
wether to show an error (default=TRUE). |
It also gives a boolean 'is.normal' value based on p.sig
a feR.normality that is a data.frame with: + is.normal: (bool) TRUE if p.value is below p.sig + p.exact.value: p value for the test + test: (character) test used -> SW for Shapiro-Wilks, Lillie(KS) for Lilliefor's correction for Kolmogorov-Smirnof test + statistic: (num) value of the statistic corresponding to the test performed + p.value: (num) p value rounded to "digits" decimal places
feR::normal.test(mtcars$mpg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.