Srho.test.ts.p {tseriesEntropy} | R Documentation |
Entropy Tests Of Serial And Cross Dependence For Time Series
Description
Entropy test of serial and cross dependence for numeric time series (continuous state space) based on
Srho.ts
. The distribution under the null hypothesis of independence is obtained by means of bootstrap/permutations methods (see ci.type
). The parallel version requires parallel
.
Usage
Srho.test.ts(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, ci.type = c("mbb","perm"),...)
## Parallel version
Srho.test.ts.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, ci.type = c("mbb","perm"),
nwork=detectCores(),...)
Arguments
x , y |
univariate numeric time series object or numeric vectors ( |
lag.max |
maximum lag at which to calculate Srho; the default is 10. |
B |
number of bootstrap/permutation replications. |
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 |
ci.type |
confidence interval type. determines how the distribution under the null hypothesis is obtained. |
nwork |
number of workers/processes to be used in parallel environments. |
... |
further arguments, typically, the MBB block length |
Details
- Univariate version: test for serial dependence
Srho.test.ts.p(x, lag.max = 10, B = 100, plot = TRUE, quant = c(0.95, 0.99), bdiag=TRUE, bw = c("reference", "mlcv", "lscv", "scv", "pi"), method =c("integral","summation"), tol=1e-03, ci.type = c("perm"), nwork=detectCores())
- Bivariate version: test for cross dependence
Srho.test.ts.p(x, y, lag.max = 10, B = 100, plot = TRUE, quant = c(0.95, 0.99), bdiag=TRUE, bw = c("reference", "mlcv", "lscv", "scv", "pi"), method =c("integral","summation"), tol=1e-03, ci.type = c("mbb","perm"), nwork=detectCores())
For each lag from 1 to lag.max
(serial dependence) or from -lag.max
to lag.max
(cross dependence) Srho.test.ts
computes a test for serial/cross dependence for time series based on Srho.ts
. The distribution under the null hypothesis of independence is obtained through either permutation or bootstrap methods. If the option mbb
is chosen (bivariate case only) the resampled series use a moving block bootstrap to acccount for the serial dependence of the original series so that the test will have better size than the permutation version.
Value
An object of class "Srho.test", which is a list with the following elements:
.Data |
vector containing Srho computed at each lag. |
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 Srho is computed. |
stationary |
Object of class |
data.type |
Object of class |
notes |
Object of class |
Author(s)
Simone Giannerini<simone.giannerini@unibo.it>
References
Granger C. W. J., Maasoumi E., Racine J., (2004) A dependence metric for possibly nonlinear processes. Journal of Time Series Analysis, 25(5), 649–669.
Maasoumi E., (1993) A compendium to information theory in economics and econometrics. Econometric Reviews, 12(2), 137–181.
See Also
See Also Srho.test.ts
and Srho.ts
.
The function Srho.test
implements the same test for integer/categorical data.
For a test for nonlinear serial dependence see Srho.test.AR
,
Trho.test.AR
, Trho.test.SA
, together with their parallel
versions: Srho.test.AR.p
, Trho.test.AR
, Trho.test.SA
.
Examples
## Not run:
## ************************************************************
## WARNING: computationally intensive, increase B with caution
## ************************************************************
set.seed(13)
n <- 120
w <- rnorm(n)
x <- arima.sim(n, model = list(ar=0.8));
y <- arima.sim(n, model = list(ar=0.8));
z <- lag(x,-1) + rnorm(n,sd=2) # dependence at lag 1
# UNIVARIATE VERSION
res1 <- Srho.test.ts.p(w, lag.max = 5, B = 40, ci.type="perm") # independence
res2 <- Srho.test.ts.p(x, lag.max = 5, B = 40, ci.type="perm") # dependence
# BIVARIATE VERSION
res3 <- Srho.test.ts.p(x, y, lag.max = 5, B = 40, ci.type="mbb") # independence
res4 <- Srho.test.ts.p(x, z, lag.max = 5, B = 40, ci.type="mbb") # dependence
## End(Not run)