[R] how to compute cross correlation

Moshe Olshansky m_olshansky at yahoo.com
Tue Sep 4 01:31:37 CEST 2007


The simlest answer is that X and Y are two vectors of
length n then (un-normalized) cross correlation
between X and Y is sum(i=1 to n)
{X(i)-Xbar)*(Y(i)-Ybar)} where Xbar and Ybar are the
means of X and Y respectively.

You may need something different, so could you be more
specific? What do you mean by ASCII - they are in an
ASCII files?

Regards,

Moshe.

--- Yogesh Tiwari <yogesh.mpi at googlemail.com> wrote:

> Hello R Users,
> 
> How to compute cross correlation between two time
> series. Data is in ASCII
> format. I am using R on windows.
> 
> Many thanks,
> 
> Regards,
> Yogesh
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>



More information about the R-help mailing list