Title: Self-Similarity Test for Normality
Version: 1.0.0
Description: Implements the Self-Similarity Test for Normality (SSTN), a new statistical test designed to assess whether a given sample originates from a normal distribution. The procedure is based on iteratively estimating the characteristic function of the sum of standardized i.i.d. random variables and comparing it to the characteristic function of the standard normal distribution. A Monte Carlo procedure is used to determine the empirical distribution of the test statistic under the null hypothesis. Details of the methodology are described in Anarat and Schwender (2025), "A normality test based on self-similarity" (Submitted).
License: GPL-3
VignetteBuilder: knitr
Suggests: knitr, rmarkdown
Encoding: UTF-8
Language: en-US
RoxygenNote: 7.3.2
NeedsCompilation: no
Packaged: 2025-09-11 15:09:15 UTC; Akin
Author: Akin Anarat [aut, cre]
Maintainer: Akin Anarat <akin.anarat@hhu.de>
Repository: CRAN
Date/Publication: 2025-09-16 07:30:02 UTC

Self-Similarity Test for Normality (SSTN)

Description

The SSTN is a statistical test for assessing whether a given sample originates from a normal distribution. It is based on the iterative application of the empirical characteristic function and compares it to the characteristic function of the standard normal distribution. A Monte Carlo procedure is used to obtain the empirical distribution of the test statistic under the null hypothesis.

Usage

sstn(
  x,
  B = 500,
  grid_length = 10,
  t_max = 4,
  M_max = 100,
  beta = 0.5,
  seed = NULL,
  verbose = TRUE
)

Arguments

x

Numeric vector of observations (x_1, \dots, x_n) drawn from a distribution with finite variance. Must have length n \ge 2.

B

Integer. Number of Monte Carlo samples. Default is 500.

grid_length

Integer. Number of grid points H for the evaluation of the standardized characteristic function. Default is 10.

t_max

Positive numeric. Upper bound of the grid t_H, typically 4 to cover the effective support of the normal characteristic function. Default is 4.

M_max

Integer. Maximum number of iterations N. Default is 100.

beta

Positive numeric. Weighting parameter in the discrepancy measure. Controls the decay rate of the exponential weight \exp(-\beta t^2). Default is 0.5.

seed

Optional integer. Random seed for reproducibility of Monte Carlo samples. Default is NULL (no fixed seed).

verbose

Logical. If TRUE (default), prints a summary of the test results including the number of summands, test statistic, and p-value.

Value

An invisible list with the following components:

test_statistic

Numeric. The observed value d_{M} of the SSTN test statistic.

null_distribution

Numeric vector of length B. Test statistics from the Monte Carlo samples under the null hypothesis.

number_summands

Integer. The determined number of summands M.

p_value

Numeric. The p-value of the test.

Author(s)

Akin Anarat akin.anarat@hhu.de

References

Anarat A. and Schwender, H. (2025). A normality test based on self-similarity. Submitted.

Examples

set.seed(123)
# Sample from standard normal (null hypothesis true)
x <- rnorm(100)
res <- sstn(x)
res$p_value

# Sample from Gamma distribution (null hypothesis false)
y <- rgamma(100, 1)
res2 <- sstn(y)
res2$p_value