normality2flag estimates the normality of a vector vector x and returns a discrete flag assessing the normality (normal, non-normal, don't know).

TODO: allow user-supplied normality test?

normality2flag(x)

Arguments

x

a numeric vector to be tested for normality

Value

a flag of value 1 if normality is not rejected at the 5% level, 2 if normality is rejected at the 5% level, and 3 if normality can't be assesed (not enough data etc.)

See also

Examples

normality2flag(rnorm(30))
#> [1] 2
normality2flag(rnorm(3))
#> [1] 3
normality2flag(runif(30))
#> [1] 1