stat_normality: Test the normality of a numeric variable

View source: R/stat_normality.r

stat_normalityR Documentation

Test the normality of a numeric variable

Description

Test the normality of a numeric variable.

Usage

stat_normality(x, alpha = 0.05, digits = 5, print = FALSE)

Arguments

x

A numeric vector

alpha

A numeric single value (default = 0.05), that is the significance level to compute the variable 'is_normal'

digits

A integer single value (default = NULL), that will be the number used to round the values

print

A boolean value, if TRUE the function will print the values in the viewer (default = FALSE)

Details

Apply the following normality tests:


- Anderson-Darling
- Cramer-Von Mises
- Kolmogorov-Smirnov
- Lilliefors
- Pearson chi-square
- Shapiro-Francia
- Shapiro-Wilk

Value

A tibble (7x4) with each test: statistic, p-value and the condicional check of normality, given the alpha.

Examples


x <- rnorm(100)

stat_normality(x)

vbfelix/relper documentation built on May 10, 2024, 10:50 p.m.