rp.test  R Documentation 
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)
y 
a numeric vector or an object of the 
k 
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, 
FDR 
a logical value for mixing the p.values using a False discovery
rate method. If 
pars1 
an optional real vector with the shape parameters of the beta
distribution used for the first 'k' random projections By default,

pars2 
an optional real vector with the shape parameters of the beta
distribution used to compute the last 'k' random projections. By default,

seed 
An optional 
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 chisquare 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 NietoReyes, A.,CuestaAlbertos, J. & Gamboa, F. (2014).
A list with class "h.test"
containing the following components:
statistic: 
an integer value with the amount of projections per test. 
parameter: 
a text that specifies the p.value mixing FDR method. 
p.value: 
the FDR mixed pvalue for the test. 
alternative: 
a character string describing the alternative hypothesis. 
method: 
a character string “k random projections test”. 
data.name: 
a character string giving the name of the data. 
Asael Alonzo Matamoros and Alicia NietoReyes.
NietoReyes, A., CuestaAlbertos, J. & Gamboa, F. (2014). A randomprojection based test of Gaussianity for stationary processes. Computational Statistics & Data Analysis, Elsevier, vol. 75(C), pages 124141.
Lobato, I., & Velasco, C. (2004). A simple test of normality in time series. Journal of econometric theory. 20(4), 671689.
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), 16831698.
lobato.test
, epps.test
# Generating an stationary arma process
y = arima.sim(100,model = list(ar = 0.3))
rp.test(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.