nor.test | R Documentation |
nor.test
performs normality tests including Shapiro-Wilk, Shapiro-Francia, Kolmogorov-Smirnov, Anderson-Darling, Cramer-von Mises, Pearson Chi-square tests, and also assess the normality of each group through plots.
nor.test(formula, data, method = c("SW", "SF", "LT", "AD", "CVM", "PT"),
alpha = 0.05, plot = c("qqplot-histogram", "qqplot", "histogram"), mfrow = NULL,
na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a tibble or data frame containing the variables in |
method |
a character string to select one of the normality tests. "SW": Shapiro-Wilk test, "SF": Shapiro-Francia test, "LT": Lilliefors (Kolmogorov-Smirnov) test, "AD": Anderson-Darling test, "CVM": Cramer-von Mises test, "PT": Pearson Chi-square test. |
alpha |
the level of significance to assess normality. Default is set to alpha = 0.05. |
plot |
a character string to select one of the plots including qqplot-histogram, qqplot, histogram. The red line is the density line of normal distribution. |
mfrow |
a two element vector to draw subsequent figures. |
na.rm |
a logical value indicating whether NA values should be stripped before the computation proceeds. |
verbose |
a logical for printing output to R console. |
A data frame gives the test results for the normality of groups via corresponding normality.
Osman Dag
homog.test
gplot
shapiro.test
library(onewaytests)
nor.test(Sepal.Length ~ Species, data = iris, method = "SW", plot = "qqplot-histogram")
nor.test(Sepal.Length ~ Species, data = iris, method = "SF", plot = "qqplot", mfrow = c(1,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.