powered by
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)
Cross-correlations for all lags
Sum of squares of cross-correlations
P-value of LB
c(-lag:lag)
length of the time series
Pseudo-observations (or residuals) of first series
Pseudo-observations (or residuals) of second series
Maximum number of lags around 0
Set to TRUE for a correlogram for all possible lags.
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)
Run the code above in your browser using DataLab