shapiro_bootstrap.test: The Sieve Bootstrap Shapiro test for normality.

View source: R/bootstrap_tests.R

shapiro_bootstrap.testR Documentation

The Sieve Bootstrap Shapiro test for normality.

Description

Performs the approximated Shapiro test for normality for univariate time series. Computes the p-value using Psaradakis and Vavra's (2020) sieve bootstrap procedure.

Usage

shapiro_bootstrap.test(y, reps = 1000, h = 100, seed = NULL)

Arguments

y

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

reps

an integer with the total bootstrap repetitions.

h

an integer with the first burn-in sieve bootstrap replicates.

seed

An optional seed to use.

Details

Employs the Shapiro test approximating the p-value using a sieve-bootstrap procedure, Psaradakis, Z. and Vávra, M. (2020).

Value

A list with class "h.test" containing the following components:

statistic:

the sieve bootstrap Shapiro's statistic.

p.value:

the p value for the test.

alternative:

a character string describing the alternative hypothesis.

method:

a character string “Sieve-Bootstrap Shapiro's test”.

data.name:

a character string giving the name of the data.

Author(s)

Asael Alonzo Matamoros.

References

Psaradakis, Z. and Vávra, M. (2020) Normality tests for dependent data: large-sample and bootstrap approaches. Communications in Statistics-Simulation and Computation 49 (2). ISSN 0361-0918.

Bulmann, P. (1997). Sieve Bootstrap for time series. Bernoulli. 3(2), 123 -148.

Patrick Royston (1982). An extension of Shapiro and Wilk's W test for normality to large samples. Applied Statistics, 31, 115–124. Doi:10.2307/2347973.

See Also

vavra.test, sieve.bootstrap

Examples

# Generating an stationary arma process
y = arima.sim(100,model = list(ar = 0.3))
jb_bootstrap.test(y)


nortsTest documentation built on May 29, 2024, 10:05 a.m.