samedi 14 mars 2020

Normality tests repeating 1000 times in R: Shapiro Wilk, Jarque Bera, Lilliefors

students and professionals,

I am currently trying to program normality tests for random sample sizes (T=10,30,50,100,500).

The functions I use for the normality tests are the following:

sim1 <- rnorm(10)

sw10 <- shapiro.test(sim1)

and this for every sample size

This results in a list with test information that has to be interpreted with confidence levels 90%, 95% and 99%.

The problem I am facing is that I need to repeat this process 1000 times.. But using the same sample sim1 does not help in this case while the same p-values are computed.

so do I use the following?

rsw10 <- replicate(shapiro.test(rnorm(10))

Plus I have to compute relative rejection frequencies, how do I extract that information?

Best regards




Aucun commentaire:

Enregistrer un commentaire