crossdep_2series: Cross-dependences for testing independence between the...

View source: R/crossdep_2series.R

crossdep_2seriesR Documentation

Cross-dependences for testing independence between the innovations of 2 series of same length

Description

This function computes the cross-dependence between x(t) and y(t-l), for Spearman, van der Waerden and Savage dependence measures, for l=-lag,.., lag, and also the combination (Wald's type) of these statistics.

Usage

crossdep_2series(x, y, lag, graph = TRUE)

Arguments

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.

Value

stat

Cross-dependences for all lags

H

Sum of squares of cross-dependences

pvalue

P-value of H

subsets

c(-lag:lag)

n

length of the time series

References

Duchesne, Ghoudi & Remillard (2012). On Testing for independence between the innovations of several time series. CJS, vol. 40, 447-479.

Nasri & Remillard (2024). Tests of independence and randomness for arbitrary data using copula-based covariances. JMVA, vol. 201, 105273.

Examples

data(gas)
outr <-crossdep_2series(gas$xres,gas$yres,3)


IndGenErrors documentation built on April 3, 2025, 9:09 p.m.