View source: R/calc_normal_tests.R
calc_normal_tests | R Documentation |
Performs the following tests of normality given a data.frame and column:
Shapiro-Francia test for the composite hypothesis of normality,
(Robust) Jarque-Bera test of normality,
Shapiro-Wilk test of normality,
Anderson-Darling test for the composite hypothesis of normality,
One–sample Kolmogorov-Smirnov test.
Stata recommends to use the Shapiro-Francia test whenever possible. Note that NAs are removed by default.
Null hypothesis: the data follows a normal distribution.
Alternative hypothesis: the data does not follow a normal distribution.
calc_normal_tests(data, var)
data |
A tibble or data frame. |
var |
A numeric vector of data values. |
A tibble
library(dplyr)
library(tibble)
data <- tibble::tibble(
x = c(rnorm(99, mean = 5, sd = 3), NA),
y = runif(100, min = 2, max = 4),
z = rnorm(100, mean = 2, sd = 3))
calc_normal_tests(data = data,
var = x)
calc_normal_tests(data = data,
var = y)
calc_normal_tests(data = data,
var = z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.