Performs the random projection test for normality. The null hypothesis (H0) is that the given data follows a stationary Gaussian process.
rp.test(y, k = 1, FDR = TRUE, pars1 = c(100,1), pars2 = c(2,7),
seed = NULL)
A list with class "h.test"
containing the following components:
an integer value with the amount of projections per test.
a text that specifies the p.value mixing FDR method.
the FDR mixed p-value for the test.
a character string describing the alternative hypothesis.
a character string “k random projections test”.
a character string giving the name of the data.
a numeric vector or an object of the ts
class containing a
stationary time series.
an integer that determines the `2k` random projections are used for
every type of test. The `pars1` argument generates the first `k` projections,
and `pars2` generates the later `k` projections. By default, k = 1
.
a logical value for mixing the p.values using a False discovery
rate method. If FDR = TRUE
, then the p.values are mixed using Benjamin
and Yekutieli (2001) False discovery Rate method for dependent procedures, on
the contrary, it applies Benjamini and Hochberg (1995) procedure.
By default, FDR = TRUE
.
an optional real vector with the shape parameters of the beta
distribution used for the first `k` random projections By default,
pars1 = c(100,1)
where, shape1 = 100
and shape2 = 1
.
an optional real vector with the shape parameters of the beta
distribution used to compute the last `k` random projections. By default,
pars2 = c(2,7)
where, shape1 = 2
and shape2 = 7
.
An optional seed
to use.
Asael Alonzo Matamoros and Alicia Nieto-Reyes.
The random projection test generates `2k` random projections of `y`. Applies Epps statistics to the odd projections and Lobato and Velasco’s statistics to the even ones. Computes the `2k` p.values using an asymptotic chi-square distribution with two degrees of freedom. Finally, mixes the p.values using a false discover rate procedure. By default, mixes the p.values using Benjamin and Yekutieli’s (2001) method.
The function uses beta distributions for generating the `2k` random projections.
By default, uses a beta(shape1 = 100,shape = 1)
distribution contained
in pars1
argument to generate the first `k` projections. For the later
`k` projections the functions uses a beta(shape1 = 2,shape = 7)
distribution
contained in pars2
argument.
The test was proposed by Nieto-Reyes, A.,Cuesta-Albertos, J. & Gamboa, F. (2014).
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.
Lobato, I., & Velasco, C. (2004). A simple test of normality in time series. Journal of econometric theory. 20(4), 671-689.
Benjamini, Y., and Yekutieli, D. (2001). The control of the false discovery rate in multiple testing under dependency. Annals of Statistics. 29, 1165–1188. Doi:10.1214/aos/1013699998.
Hochberg, Y. (1988). A sharper Bonferroni procedure for multiple tests of significance. Biometrika. 75, 800–803. Doi:10.2307/2336325.
Epps, T.W. (1987). Testing that a stationary time series is Gaussian. The Annals of Statistic. 15(4), 1683-1698.
lobato.test
, epps.test
# Generating an stationary arma process
y = arima.sim(100,model = list(ar = 0.3))
rp.test(y)
Run the code above in your browser using DataLab