View source: R/autocovariances.R
acfGarchTest | R Documentation |
Carry out tests for weak white noise under GARCH, GARCH-type, and stochastic volatility null hypotheses.
acfGarchTest(acr, x, nlags, interval = 0.95)
acfWnTest(acr, x, nlags, interval = 0.95, ...)
acr |
autocorrelations. |
x |
time series. |
nlags |
how many lags to use. |
interval |
If not NULL, compute also confidence intervals with the specified coverage probability. |
... |
additional arguments for the computation of the variance matrix
under the null hypothesis, passed on to |
Unlike the autocorrelation IID test, the time series is needed here to estimate the covariance matrix of the autocorrelations under the null hypothesis.
acfGarchTest
performs a test for uncorrelatedness of a time
series. The null hypothesis is that the time series is GARCH,
see \insertCiteFrancqZakoian2010garch;textualsarima.
acfWnTest
performs a test for uncorrelatedness of a time
series under a weaker null hypothesis.
The null hypothesis is that the time series is GARCH-type or
from a stochasitc volatily model,
see \insertCitekokoszka2011nonlinearity;textualsarima.
See the references for details and precise specification of the hypotheses.
The format of the return value is the same as for acfIidTest
.
a list with components "test" and "ci"
Georgi N. Boshnakov
whiteNoiseTest
,
acfIidTest
;
plot-methods
for graphical representations of results
## see also the examples for \code{\link{whiteNoiseTest}}
set.seed(1234)
n <- 5000
x <- sarima:::rgarch1p1(n, alpha = 0.3, beta = 0.55, omega = 1, n.skip = 100)
x.acf <- autocorrelations(x)
x.pacf <- partialAutocorrelations(x)
acfGarchTest(x.acf, x = x, nlags = c(5,10,20))
acfGarchTest(x.pacf, x = x, nlags = c(5,10,20))
# do not compute CI's:
acfGarchTest(x.pacf, x = x, nlags = c(5,10,20), interval = NULL)
## plot methods call acfGarchTest() suitably if 'x' is given:
plot(x.acf, data = x)
plot(x.pacf, data = x)
## use 90% limits:
plot(x.acf, data = x, interval = 0.90)
acfWnTest(x.acf, x = x, nlags = c(5,10,20))
nvarOfAcfKP(x, maxlag = 20)
whiteNoiseTest(x.acf, h0 = "arch-type", x = x, nlags = c(5,10,20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.