sftests: Many Shapiro-Francia normality tests

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/sftests.R

Description

Many Shapiro-Francia normality tests.

Usage

1
2
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

1
2
3
4
5
6
x <- matrnorm(200, 100)
system.time( sftests(x) )
a <- sftests(x)
mean(a[, 3]<0.05) 
x <- rnorm(100)
res<-sftest(x)

Rfast documentation built on Dec. 11, 2021, 9:59 a.m.