sftests: Many Shapiro-Francia normality tests

View source: R/sftest.R

Many Shapiro-Francia normality testsR Documentation

Many Shapiro-Francia normality tests

Description

Many Shapiro-Francia normality tests.

Usage

sftests(x, logged = FALSE)
sftest(x, logged = FALSE)

Arguments

x

A matrix with the data, where the rows denote the observations and the columns are the variables. In the case of a single sample, then this must be a vector and "sftest" is to be used.

logged

Should the p-values be returned (FALSE) or their logarithm (TRUE)?

Details

The Shapiro-Francia univariate normality test is performed for each column (variable) of the matrix x.

Value

A matrix with the squared correlation between the ordered values and the standard normal ordered statistics, the test statistic and the p-value of each test. If the "sftest" has been used, the output is a vector with these three elements.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.

References

Royston J. P. (1983). A simple method for evaluating the Shapiro-Francia W' test of non-normality. The Statistician, 32(3): 297-300.

Mbah A. K. & Paothong A. (2015). Shapiro-Francia test compared to other normality test using expected p-value. Journal of Statistical Computation and Simulation, 85(15): 3002-3016.

See Also

ttests, ttest, ftests

Examples

x <- matrnorm(200, 100)
sftests(x)
a <- sftests(x)
mean(a[, 3]<0.05) 
x <- rnorm(100)
res<-sftest(x)

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.