Entropy test of nonlinearity for time series based
on Srho.ts and surrogate data obtained through
the sieve bootstrap (AR modeling). The parallel version requires parallel.
Trho.test.AR(x, y, lag.max = 10, B = 100, plot = TRUE, quant = c(0.95, 0.99),
bw = c("reference", "mlcv", "lscv", "scv", "pi"), bdiag=TRUE,
method = c("integral", "summation"), tol = 0.001, order.max = NULL,
fit.method=c("yule-walker", "burg", "ols", "mle", "yw"), smoothed = TRUE,...)## Parallel version
Trho.test.AR.p(x, y, lag.max = 10, B = 100, plot = TRUE, quant = c(0.95, 0.99),
bw = c("reference", "mlcv", "lscv", "scv", "pi"), bdiag=TRUE,
method = c("integral", "summation"), tol = 0.001, order.max = NULL,
fit.method=c("yule-walker", "burg", "ols", "mle", "yw"), smoothed = TRUE,
nwork=detectCores(),...)
An object of class "Srho.test", which is a list with the following elements:
vector of lag.max elements containing Trho computed at each lag.
call:Object of class "call": contains the call to the routine.
call.h:Object of class "call": contains the call to the routine used for obtaining the surrogates or the bootstrap replicates under the null hypothesis
Object of class "matrix": contains the quantiles of the surrogate distribution under the null hypothesis.
test.typeObject of class "character": contains a description of the type of test performed.
Object of class "list": contains the lags at which Trho exceeds the confidence bands at quant% under the null hypothesis.
Object of class "numeric": contains the bootstrap p-value for each lag.
integer vector that contains the lags at which Trho is computed.
Object of class "logical": TRUE if the stationary version is computed. Set to FALSE by default as only the non-stationary version is implemented.
Object of class "character": contains the data type.
Object of class "character": additional notes.
univariate numeric time series object or numeric vectors (y is missing in the univariate case).
maximum lag at which to calculate Trho; the default is 10.
number of surrogate time series.
logical. If TRUE (the default) produces a plot of Trho together with confidence bands under the null hypothesis of linearity at 95% and 99%.
quantiles to be specified for the computation of the significant lags and the plot of confidence bands. Up to 2 quantiles can be specified. Defaults are 95% and 99%.
see Srho.ts.
see Srho.ts.
see Srho.ts.
see Srho.ts.
see surrogate.ARs.
see surrogate.ARs.
logical. If TRUE (the default) uses the smoothed sieve bootstrap in surrogate.ARs to generate surrogates. Otherwise uses the classic sieve by calling surrogate.AR.
number of workers/processes to be used in parallel environments.
further arguments, typically passed to hcubature.
Simone Giannerini<simone.giannerini@unibo.it>
For each lag from 1 to lag.max Trho.test.AR computes a test for nonlinearity for time series based
on Srho.ts. The distribution under the null hypothesis of a linear Gaussian process is obtained through the sieve bootstrap.
The routine requires the package parallel to spawn multiple workers.
Giannerini S., Maasoumi E., Bee Dagum E., (2015), Entropy testing for nonlinear serial dependence in time series, Biometrika, 102(3), 661--675 tools:::Rd_expr_doi("10.1093/biomet/asv007").
See Also Srho.ts, surrogate.AR, surrogate.ARs, Trho.test.AR.
if (FALSE) {
# modify nwork to match the number of available cores
set.seed(13)
b <- 100
x <- arima.sim(n=120, model = list(ar=0.8));
result <- Trho.test.AR.p(x, lag.max = 5, B=b, nwork=2)
## ** Compare timings **
system.time(Trho.test.AR.p(x,lag.max = 5,B=b, nwork=4))
system.time(Trho.test.AR(x, lag.max = 5,B=b))
}Run the code above in your browser using DataLab