[R] Cross correlation in time series

Spencer Graves spencer.graves at pdf.com
Tue Mar 28 17:56:01 CEST 2006

	  Could you please clarify your data:  Do you have CO2 levels in an 
ecosystem over time, from which you have computed (a) time rate of 
change in CO2 and (b) deviation of CO2 levels from some theoretical 
balance?  If yes, is this "balance" constant or varying, and if varying, 
are the variations driven by factors not otherwise obviously contained 
in the CO2 levels themselves?  I ask, because it sounds to me like you 
may only actually have two different transformations of one series, and 
the analysis would be different between the two.

	  Also, are your observations all at regular intervals?  If yes, what 
percent of the observations are missing?  If you have two series, not 
just one, are they sampled at the same times or at different times?

	  Regarding "ccf", this computes and plots the correlation between X[t] 
and Y[t-j] for different values of j.

	  For a brief introduction to time series analysis especially in R, I 
recommend the following:

	  1.  Ch. 14 in Venables and Ripley (2002) Modern Applied Statistics 
with S, 4th ed. (Springer)

	  2.  The vignettes dse1, dse2, and zoo available with those packages.

	  hope this helps,
	  spencer graves	

Hufkens Koen wrote:

> Hi list,
> I'm working on time series of (bio)physical data explaining (or not) the
> net ecosystem exchange of a system (+_ CO2 in versus CO2 out balance).
> I decomposed the time series of the various explaining variable
> according to scale (wavelet decomposition). With the coefficients I got
> from the wavelet decomposition I applied a (multiple) regression, giving
> some expected results. The net ecosystem exchange (CO2 balance) is
> mostly determined by the light regime (driving photosynthesis) and the
> water availability (inducing stress if absent), and this over all the
> scales.
> So sadly, pinpointing a certain scale on a certain process wasn't
> possible. I had hoped to see for example a relation between air
> temperature and a response of the vegetation/ecosystem, and this for a
> certain scale. Global trends are present but short term responses are
> not present.
> Using regressions in this previous analysis I thought that considering
> that some processes do show some lag if it comes to showing a response
> on a changing variable a one on one regression of time series might have
> been the wrong approach because this states that there is also an almost
> direct one in one relation between action and reaction. So what I'm
> looking for is a method to determine that after let's say 5 warm days,
> the net ecosystem exchange peaks as well.
> Any suggestions on how to determine a certain, lag between time series.
> I found a post in the archives discussing convolve() but this doesn't
> seem the right thing. Also ccf() is mentioned, does this calculate a
> correlation coefficient as two time series are shifted past eachother
> for certain lag distances or am I mistaken? If so, what is the
> implication of using a smaller and smaller sampling window (increasing
> your time resolution say going from year level to month to day level)?
> Any input on how to compare two time series would be appreciated...
> Sorry for the rather theoretical/technical post.
> Best regards,
> Koen Hufkens
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list