normal.test: The normality test for stationary process

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

View source: R/test.R

Description

Perform a normality test. The null hypothesis (H0) is that the given data follows a stationary Gaussian process.

Usage

1
2
normal.test(y,normality = c("epps","lobato","vavra","rp","jb","ad","shapiro"),
                    alpha = 0.05)

Arguments

y

a numeric vector or an object of the ts class containing a stationary time series.

normality

A character string naming the desired test for checking normality. Valid values are "epps" for the Epps, "lobato" for Lobato and Velasco's,"vavra" for the Psaradakis and Vavra, "rp" for the random projections, "jb" for the Jarque and Beras, "ad" for Anderson Darling test, and "shapiro" for the Shapiro-Wilk's test. The default value is "epps" test.

alpha

Level of the test, possible values range from 0.01 to 0.1. By default alpha = 0.05 is used.

Details

Several different tests are available: "lobato", "epps", "vavras" and "rp" test are for testing normality in stationary process. "jb", "ad", and "shapiro" tests are for numeric data. In all cases, the alternative hypothesis is that y follows a Gaussian process. By default, alpha = 0.05 is used to select the more likely hypothesis.

Value

An h.test class with the main results of normal hypothesis test.

Author(s)

Asael Alonzo Matamoros

References

Epps, T.W. (1987). Testing that a stationary time series is Gaussian. The Annals of Statistic. 15(4), 1683-1698.

Lobato, I., & Velasco, C. (2004). A simple test of normality in time series. Journal of econometric theory. 20(4), 671-689.

Psaradakis, Z. & Vavra, M. (2017). A distance test of normality for a wide class of stationary process. Journal of Econometrics and Statistics. 2, 50-60.

Nieto-Reyes, A., Cuesta-Albertos, J. & Gamboa, F. (2014). A random-projection based test of Gaussianity for stationary processes. Computational Statistics & Data Analysis, Elsevier, vol. 75(C), pages 124-141.

Patrick, R. (1982). An extension of Shapiro and Wilk's W test for normality to large samples. Journal of Applied Statistics. 31, 115-124.

Cromwell, J. B., Labys, W. C. & Terraza, M. (1994). Univariate Tests for Time Series Models. Sage, Thousand Oaks, CA. 20-22.

See Also

uroot.test,seasonal.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#  stationary  ar process
y = arima.sim(100,model = list(ar = 0.3))
normal.test(y) # epps test

# normal random sample
y = rnorm(100)
normal.test(y,normality = "shapiro")

# exponential random sample
y = rexp(100)
normal.test(y,normality = "ad")

nortsTest documentation built on June 17, 2021, 5:06 p.m.