[R] Cross-correlation

Kaspar Pflugshaupt pflugshaupt at geobot.umnw.ethz.ch
Wed Apr 17 15:42:34 CEST 2002


On 17.4.2002 16:55 Uhr, Sven Garbade wrote:

> I want to recalculate an analysis found in a paper. An empirical time
> series (velocities, altogether 241 data values) were cross-correlated
> with an invertited cosine function (200 milliseconds duration).
> Following the authors the resulting values should offer some advantages:
> being independent of gain and peak latency differences between single
> trials and preserving the temporal aspect of the modulation. Is there a
> function to calculate cross-correlations in R? I think cor() is ot the
> right one.

You need the function ccf() in library(ts).

Cheers

Kaspar Pflugshaupt


-- 

Kaspar Pflugshaupt
Geobotanisches Institut
Zuerichbergstr. 38
CH-8044 Zuerich

Tel. ++41 1 632 43 19
Fax  ++41 1 632 12 15

mailto:pflugshaupt at geobot.umnw.ethz.ch
privat:pflugshaupt at mails.ch
http://www.geobot.umnw.ethz.ch

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list