pval_shapiro | R Documentation |
p
-value from modified Shapiro-Wilk Normality TestObtain p
-value from shapiro.test,
taking into consideration of several exceptions.
pval_shapiro(x, CLT = FALSE, ...)
x |
double vector |
CLT |
logical scalar, whether to allow the use of Central Limit Theorem, default |
... |
additional parameters, currently not in use |
Function pval_shapiro()
provides a pseudo p
-value for several exceptions of
shapiro.test, serving as a criteria of whether robust statistics/tests need to be used
length(x) < 3L
returns p=0
, indicating that robust methods are needed.
length(x) > 5e3L
returns p=1
, indicating that no robust method is needed. For such large sample size, robust methods could be too slow.
CLT & length(x) > 30L
returns p=1
, indicating that no robust method is needed because of the use of Central Limit Theorem.
x
values are identical (or all.equal, to be implemented in future release)returns p=0
, indicating that robust methods are needed.
use the p
-value from shapiro.test.
Function pval_shapiro()
returns a double scalar.
pval_shapiro(rnorm(5))
sapply(with(airquality, split(Ozone, f = Month)), FUN = pval_shapiro)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.