Re: [R] ccf and covariance

2008-04-23 Thread Prof Brian Ripley
On Wed, 23 Apr 2008, Bob Farmer wrote: > Thanks to Prof. Ripley and Phil Spector for pointing out that the > autocorrelation functions must use a "nontraditional" definition of > the covariance, involving a denominator of n (instead of n-1) in order > to satisfy an assumption of second-order stati

Re: [R] ccf and covariance

2008-04-23 Thread Bob Farmer
Thanks to Prof. Ripley and Phil Spector for pointing out that the autocorrelation functions must use a "nontraditional" definition of the covariance, involving a denominator of n (instead of n-1) in order to satisfy an assumption of second-order stationarity in the (unbiased) covariance estimators

Re: [R] ccf and covariance

2008-04-23 Thread Prof Brian Ripley
On Wed, 23 Apr 2008, Bob Farmer wrote: > Hi. > It's my understanding that a cross-correlation function of vectors x > and y at lag zero is equivalent to their correlation (or covariance, > depending on how the ccf is defined). The ratio of your values is > MASS::fractions(282568.5/259021) [1] 12

[R] ccf and covariance

2008-04-23 Thread Bob Farmer
Hi. It's my understanding that a cross-correlation function of vectors x and y at lag zero is equivalent to their correlation (or covariance, depending on how the ccf is defined). If this is true, could somebody please explain why I get an inconsistent result between cov() and ccf(type = "covarianc