Learn R Programming

goft (version 1.3.6)

sn_test: Test for skew normality

Description

Transformation test of fit for skew-normality (Gonzalez-Estrada and Cosmes, 2019).

Usage

sn_test(x, method = "transf")

Arguments

x

a numeric data vector containing a random sample of size n.

method

a character string giving the name of the test to be used. So far the only option is "transf".

Value

A list with class "htest" containing the following components.

p.value

an approximated p-value of the test.

method

the character string "Shapiro-Wilk test for skew-normal distributions".

data.name

a character string giving the name of the data set.

Details

The random sample is transformed to approximately normal variables. Shapiro-Wilk test is used for testing normality.

The sample size should be larger than 50 in order to have a reasonable control of the type I error probability.

References

Gonzalez-Estrada, E. and Cosmes, W. (2020). Shapiro-Wilk test for skew normal distributions based on data transformations. Journal of Statistical Computation and Simulation, 89 17, 3258-3272. https://doi.org/10.1080/00949655.2019.1658763

Examples

Run this code
# NOT RUN {
data(strength)                # loading the "strength" data set
y  <- strength$strain   
sn_test(y)                    # testing skew normality on the strain variable  
# }

Run the code above in your browser using DataLab