lagtime {wasim} | R Documentation |
This function calculates the lagtime between x and y, defined as the shift resulting in the maximum cross correlation.
lagtime(x, y)
x |
Time series |
y |
Time series |
The lagtime as scalar. Positive if x is shifted towards later times.
Dominik Reusser
data(example.peaks,package="wasim") plot(reference.peak, type="l") lines(example.peaks[7,], lty=2) lagtime(reference.peak, example.peaks[7,])