Title: | Tests of Independence Between Innovations of Generalized Error Models |
---|---|
Description: | Computation of test statistics of independence between (continuous) innovations of time series. They Can be used with stochastic volatility models and Hidden Markov Models (HMM). This improves the results in Duchesne, Ghoudi & Remillard (2012) <doi:10.1002/cjs.11141>. |
Authors: | Kilani ghoudi [aut, ctb, cph], Bouchra R. Nasri [aut, ctb, cph], Bruno N Remillard [aut, cre, cph], Pierre Duchesne [aut, ctb, cph] |
Maintainer: | Bruno N Remillard <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.4 |
Built: | 2024-11-11 06:59:42 UTC |
Source: | CRAN |
This function computes the cross-correlations between x(t) and y(t-l), for l=-lag,.., lag, and also the combination (Wald's type) of these statistics.
crosscor_2series(x, y, lag, graph = TRUE)
crosscor_2series(x, y, lag, graph = TRUE)
x |
Pseudo-observations (or residuals) of first series |
y |
Pseudo-observations (or residuals) of second series |
lag |
Maximum number of lags around 0 |
graph |
Set to TRUE for a correlogram for all possible lags. |
stat |
Cross-correlations for all lags |
LB |
Sum of squares of cross-correlations |
pvalue |
P-value of LB |
subsets |
c(-lag:lag) |
n |
length of the time series |
Duchesne, Ghoudi & Remillard (2012). On Testing for independence between the innovations of several time series. CJS, vol. 40, 447-479.
data(gas) outr <-crosscor_2series(gas$xres,gas$yres,3)
data(gas) outr <-crosscor_2series(gas$xres,gas$yres,3)
This function computes the cross-correlations for all lags = -lag2, .. lag2, for all pairs, and for pair of lags = (-lag3,-lag3),...(lag3,lag3) for the three series3.
crosscor_3series(x, y, z, lag2, lag3)
crosscor_3series(x, y, z, lag2, lag3)
x |
Pseudo-observations (or residuals) of first series. |
y |
Pseudo-observations (or residuals) of second series. |
z |
Pseudo-observations (or residuals) of third series. |
lag2 |
Maximum number of lags around 0 for pairs of series. |
lag3 |
Maximum number of lags around 0 for the three series. |
LB |
Cross-correlations for all lags and for all subsets |
H |
Sum of squares of cross-correlations for all subsets |
pvalue |
P-value of LB for all subsets and H |
n |
length of the time series |
Duchesne, Ghoudi & Remillard (2012). On Testing for independence between the innovations of several time series. CJS, vol. 40, 447-479.
# Romano-Siegel's example # data(romano_ex) outr = crosscor_3series(romano_ex$x,romano_ex$y,romano_ex$z,5,2)
# Romano-Siegel's example # data(romano_ex) outr = crosscor_3series(romano_ex$x,romano_ex$y,romano_ex$z,5,2)
This function, used in crosscor_2series and crosscor_3series plots the graphs of the cross-correlation statistics.
CrossCorrelogram(object, comb, rot = 0)
CrossCorrelogram(object, comb, rot = 0)
object |
List of the output (statistics, pvalues) from crosscor_2series and crosscor_3series |
comb |
Name (string) of series, e.g., comb="(x,y)" |
rot |
Rotation of labels (default=0) |
Output |
No values are returned; only the graph is printed |
Duchesne, Ghoudi & Remillard (2012). On Testing for independence between the innovations of several time series. CJS, vol. 40, 447-479.
This function computes the Cramer-von Mises statistics between x(t) and y(t-l), for l=-lag,.., lag, and also the combinations of the p-values of these statistics.
cvm_2series(x, y, lag, graph = TRUE)
cvm_2series(x, y, lag, graph = TRUE)
x |
Pseudo-observations (or residuals) of first series |
y |
Pseudo-observations (or residuals) of second series |
lag |
Maximum number of lags around 0 |
graph |
Set to TRUE for a dependogram for all possible lags. |
cvm |
Cramer-von Mises statistics for all lags |
Wstat |
Sum of (unbiased) Cramer-von Mises statistics |
Fstat |
Combination of p-values of the Cramer-von Mises statistics |
pvalue |
List of p-values for the cvm, Wstat, and Fstat |
Duchesne, Ghoudi & Remillard (2012). On Testing for independence between the innovations of several time series. CJS, vol. 40, 447-479.
data(gas) out <-cvm_2series(gas$xres,gas$yres,3)
data(gas) out <-cvm_2series(gas$xres,gas$yres,3)
This function computes the Cramer-von Mises statistics between x(t), y(t-l2), z(t-l3), for l2=-lag2,.., lag2, l3=-lag3,.., lag3,and also the combinations of these statistics.
cvm_3series(x, y, z, lag2, lag3)
cvm_3series(x, y, z, lag2, lag3)
x |
Pseudo-observations (or residuals) of first series. |
y |
Pseudo-observations (or residuals) of second series. |
z |
Pseudo-observations (or residuals) of third series. |
lag2 |
Maximum number of lags around 0 for pairs of series. |
lag3 |
Maximum number of lags around 0 for the three series. |
cvm |
Cramer-von Mises statistics for all lags and for all subsets |
Wstat |
Sum of (unbiased) Cramer-von Mises statistics for all subsets |
Fstat |
Combination of p-values of the Cramer-von Mises statistics |
pvalue |
List of p-values for the cvm, Wstat, and Fstat |
Duchesne, Ghoudi & Remillard (2012). On Testing for independence between the innovations of several time series. CJS, vol. 40, 447-479.
set.seed(1) x0 = rnorm(100); y = rnorm(100); z = rnorm(100);
set.seed(1) x0 = rnorm(100); y = rnorm(100); z = rnorm(100);
This function, used in cvm_2series and cvm_3series draws the P-values of the Moebius Cramer-von Mises statistics.
Dependogram(object, stat, rot = 0)
Dependogram(object, stat, rot = 0)
object |
List of the output (statistics, pvalues) from cvm_2series and cvmr_3series |
stat |
Name (string) of statistics to be used |
rot |
Rotation of labels (default=0) |
Output |
No values are returned; only the graph is printed |
Duchesne, Ghoudi & Remillard (2012). On Testing for independence between the innovations of several time series. CJS, vol. 40, 447-479.
Data frame containg xres (standardized residuals of gas prices from a ARMA(2,2) model) and yres (standardized residuals of oil prices from a ARMA(1,1)-GARCH(1,1) model).
data(gas)
data(gas)
Residuals
data(gas) plot(gas$xres)
data(gas) plot(gas$xres)
Data frame containing 100 values of x,y,z generated as follows: x0 = rnorm(100); y = rnorm(100); z = rnorm(100); x = abs(x0)*sign(y*z). All pairs are independent but the three series are not.
data(romano_ex)
data(romano_ex)
dataframe
data(romano_ex) plot(romano_ex$x)
data(romano_ex) plot(romano_ex$x)