Skip to main content
10 events
when toggle format what by license comment
Mar 12, 2016 at 3:45 vote accept Sagar Parajuli
Mar 9, 2016 at 19:19 comment added Richard Hardy There can be no blank cells in R (regardless of what you are going to do later, such as calculate correlation). You may check how the data was read into an R object (data frame, for example) before calculating the correlation. The cor function itself can treat NA values differently; type ?cor in R for details.
Mar 9, 2016 at 19:12 comment added Sagar Parajuli Do you know how are the blank cells treated while calculating correlation in R? Are they replaced by zeros as in cross correlation in matlab or they are replaced by NaNs?
Mar 9, 2016 at 19:10 vote accept Sagar Parajuli
Mar 9, 2016 at 20:02
Mar 7, 2016 at 6:22 comment added Richard Hardy I don't know the Matlab implementation, but for example in R cross correlation is Pearson correlation for lagged series.
Mar 6, 2016 at 23:59 comment added Sagar Parajuli Thanks Richard for a thorough answer. I still want to make sure of one point though. So based on your answer, when we use cross correlation function such as 'xcorr' in matlab (using 'coeff' option), then the function is calculating Pearson correlation coefficient right? The matlab page does not provide the formula so I was not sure.
Mar 6, 2016 at 9:26 comment added Richard Hardy I think it is more precise to say "Pearson correlation between lagged time series" rather than "lagged Pearson correlation between time series" -- because it one of the time series that gets lagged with respect to another, not the correlation coefficient.
Mar 6, 2016 at 9:16 history edited Richard Hardy CC BY-SA 3.0
added 16 characters in body; edited tags; edited title
Mar 6, 2016 at 9:13 answer added Richard Hardy timeline score: 4
Mar 6, 2016 at 5:45 history asked Sagar Parajuli CC BY-SA 3.0