normal.test: normal.test

View source: R/math.normality.R

normal.testR Documentation

normal.test

Description

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

Usage

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
)

Arguments

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).

Details

It also gives a boolean 'is.normal' value based on p.sig

Value

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

Examples


feR::normal.test(mtcars$mpg)


feranpre/feR documentation built on Nov. 22, 2022, 2:29 a.m.