Does anyone know a test of normality that can be estimated (in R) for samples between 12 to 15 thousand observations?
The shapiro.test should have sample size between 3 and 5000, does not apply to my sample.
Does anyone know a test of normality that can be estimated (in R) for samples between 12 to 15 thousand observations?
The shapiro.test should have sample size between 3 and 5000, does not apply to my sample.
You can use Anderson-Darling
Install the package nortest
and run:
library(nortest)
ad.test(rnorm(5001))
# Anderson-Darling normality test
#
# data: rnorm(5001)
# A = 0.2826, p-value = 0.6359
ad.test(runif(5001))
# Anderson-Darling normality test
#
# data: runif(5001)
# A = 65.183, p-value < 2.2e-16
Here has a good explanation because there are limitations regarding the size of the sample. And also strong opinions of why not use these tests.
Since there are criticisms of normality inspection using formal tests, an alternative is to do graphical inspection by histogram and see if the bell shape occurs in the resulting figure. The hist (data) command does this. Look for normal distribution histograms images and use them for reference. If your histogram is not bell-shaped, try transformations in the data and redo the histogram.