Trho.test.SA.p {tseriesEntropy} | R Documentation |
Entropy Tests For Nonlinearity In Time Series - Parallel Version
Description
Entropy test of nonlinearity for time series based
on Srho.ts
and surrogate data obtained through
Simulated Annealing. The parallel version requires parallel
.
Usage
Trho.test.SA(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=1e-03, nlag=trunc(length(x)/4),
Te=0.0015, RT=0.9, eps.SA=0.05, nsuccmax=30, nmax=300, che=100000,...)
Trho.test.SA.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=1e-03, nlag=trunc(length(x)/4), Te=0.0015,
RT=0.9, eps.SA=0.05, nsuccmax=30, nmax=300, che=100000, nwork=detectCores(),...)
Arguments
x , y |
univariate numeric time series object or numeric vectors ( |
lag.max |
maximum lag at which to calculate Trho; the default is 10. |
B |
number of surrogate time series. |
plot |
logical. If |
quant |
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%. |
bw |
see |
bdiag |
see |
method |
see |
tol |
see |
nlag |
see |
Te |
see |
RT |
see |
eps.SA |
see |
nsuccmax |
see |
nmax |
see |
che |
see |
nwork |
number of workers/processes to be used in parallel environments. |
... |
further arguments, typically passed to |
Details
For each lag from 1 to lag.max
Trho.test.SA
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 a generalization of surrogate data
methods. Surrogate time series are obtained through Simulated Annealing (SA). Sensible (N-dependent) defaults are derived for the parameters of the SA
algorithm, there should not be the need to change them. The routine requires the package parallel to spawn multiple workers.
Value
An object of class "Srho.test", which is a list with the following elements:
.Data |
vector of |
call: |
Object of class |
call.h: |
Object of class |
quantiles |
Object of class |
test.type |
Object of class |
significant.lags |
Object of class |
p.value |
Object of class |
lags |
integer vector that contains the lags at which Trho is computed. |
stationary |
Object of class |
data.type |
Object of class |
notes |
Object of class |
Author(s)
Simone Giannerini<simone.giannerini@unibo.it>
References
Giannerini S., Maasoumi E., Bee Dagum E., (2015), Entropy testing for nonlinear serial dependence in time series, Biometrika, 102(3), 661–675 doi:10.1093/biomet/asv007.
See Also
See Also Srho.ts
, surrogate.SA
, Trho.test.SA
.
Examples
## Not run:
# modify nwork to match the number of available cores
set.seed(13)
x <- arima.sim(n=120, model = list(ar=0.8));
result <- Trho.test.SA.p(x, lag.max = 5, B = 100, bw='reference', nwork=2)
## ** Compare timings **
system.time(Trho.test.SA.p(x, lag.max = 5, B = 100, bw='reference', nwork=4))
system.time(Trho.test.SA(x, lag.max = 5, B = 100, bw='reference'))
## End(Not run)