Description Usage Arguments Value Examples
This function uses the Shapiro-Wilk to determine whether a set of data points is normally distributed. There are three approaches: original, modified, or Royston. For an explanation of the different uses of the approaches, look at the Readme file under "A Note on the Algorithms". The null hypothesis is that the data is normally distributed, and the alternative hypothesis is that the data is not normally distributed. Note that it is recommended to use the Shapiro-Wilk test for n < 5000 data points because the test is sensitive to detecting non-normality, and a tactic to use for n > 5000 data points is to take a random sample of n = 5000 data points and run the Shapiro-Wilk test on the sample.
1 | sw_test(vec_value, approach = "royston", use_c = T)
|
vec_value |
vector containing data points; integer or double |
approach |
designation of the approach to be used; character, one of "original", "modified", or "royston" |
use_c |
whether or not to use Rcpp to calculate W; boolean, 0 corresponding to R implentation and 1 corresponding toRcpp implementation |
toreturn, an object of class "htest" containing the results of the Shapiro-Wilk test
1 | sw_test (rnorm(10, 0, 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.