Main function of the package
sstn(): This is the primary function of the package, which performs the SSTN to assess whether a given numeric sample originates from a normal distribution. The function returns a \(p\)-value indicating the significance of the deviation from normality.
Below, we provide a brief example of how to use the
sstn() function.
set.seed(123)
# Sample from standard normal (null hypothesis true)
x <- rnorm(100)
res <- sstn(x)
#> SSTN Test
#> --------------------------------------------------
#> Method: SSTN (asymptotic null distribution)
#> Test statistic (reported): 0.78661
#> p-value: 0.51400
res$p.value
#> [1] 0.514
# Sample from Gamma distribution (null hypothesis false)
y <- rgamma(100, 1)
res2 <- sstn(y)
#> SSTN Test
#> --------------------------------------------------
#> Method: SSTN (asymptotic null distribution)
#> Test statistic (reported): 27.74172
#> p-value: 0.00000
res2$p.value
#> [1] 0