Skip to content
Prev 307851 / 398503 Next

ccf(x,y) vs. cor() of x and lagged values of y

On Fri, Oct 12, 2012 at 12:28 AM, Mihnea Constantinescu
<mihnea.const at gmail.com> wrote:
I'd bet that you'd also find that

cor(x,y) = cor(x, lag(y,-1))

? That's because the effect of "lagging" seems to be discarded by
cor() which only looks at the data itself and doesn't align the
observations. The ccf() result is the one you want.

Cheers,
Michael