[R] how to optimise cross-correlation plot to study time lag between time-series?

Jan Verbesselt Jan.Verbesselt at biw.kuleuven.be
Mon Oct 31 09:58:52 CET 2005


Dear R-help,

How could a cross-correlation plot be optimized such that the relationship
between seasonal time-series can be studied?

We are working with strong seasonal time-series and derived a
cross-correlation plot to study the relationship between time-series. The
seasonal variation however strongly influences the cross-correlation plot
and the plot seems to be “rather” symmetrical (max cross-correlation
coefficient occurs at lag 0). We would like to visualize the deviation from
the symmetrical shape such that the relationship between these two time
series can be studied. How can the symmetry be investigated by using a
cross-corr. plot (ccf())?

We tried the following:

    cross <- ccf(TS1, int.TS2, main= "")
    
    # produce the standard shape by correlating TS1 with TS1
    test <- ccf(TS1, TS1)

    # add the standard shape on the cross-correlation plot of TS1 with TS2

    plot(cross)
    par(new = T)
    plot(test$lag, test$acf, axes=F, xlab="", ylab="", col=2)
    
   
Is there another technique to visualize the difference from the symmetrical
shape? Is ts1 lagged vs. ts2?

Jan
(*Version R 2.2)


Ps. -We tried also ccf() after differencing and decompositioning but
seasonality remains in the residuals.
     -max cross-correlation mostly occurs at lag 0.


_______________________________________________________________________
Ir. Jan Verbesselt
Research Associate
Biosystems Department ~ M³-BIORES
Vital Decosterstraat 102, 3000 Leuven, Belgium
Tel: +32-16-329750   Fax: +32-16-329760
http://gloveg.kuleuven.ac.be/
_______________________________________________________________________



Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm




More information about the R-help mailing list