search for: my_shifted_seri

Displaying 1 result from an estimated 1 matches for "my_shifted_seri".

Did you mean: my_shifted_serie
2010 Apr 13
0
ccf problem (cross-correlation)
Hi all, I have a problem concerning my understanding of the cross-correlation (ccf) function in R. assume a time serie as: > t<-seq(0,6.28,by=0.01); > my_serie<-ts(sin(t),start=0,end=6.28,deltat=0.01) then I generate an other one shifted by 12 time points: > my_shifted_serie<-ts(sin(t),start=0+0.12,end=6.28+0.12,deltat=0.01) if I do the cross-correlation I get that the two series are shifted by 12 time units: > c<-ccf(my_serie,my_shifted_serie); c[[4]][which(c[[1]]==max(c[[1]]))] [1] -0.12 This works for all shift from 0.01 to 0.12. If I do a longer shift,...