[R] very basic series correlation question

Bert Gunter gunter.berton at gene.com
Sun Jan 5 18:55:42 CET 2014


Robert:

Do the sampling rates differ for the two locations, or over time but
are the same at both locations? It sounds like the former, in which
case the data are *not* paired -- e.g. one location may have been
sampled monthly, the other weekly.  So if this is the case, the OP
would first have to create the pairing before proceeding, and I don't
know whether this even makes sense for the sorts of measurements he
has (to say nothing of the possible loss of information).

If I am correct, then I think either a local consultant (given the
OP's admitted ignorance of statistics) or posting on SO,
stats.stackexchange.com, is where he should go. If not, then your
reply works fine.

Cheers,

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch




On Sun, Jan 5, 2014 at 9:30 AM, Robert Baer <rbaer at atsu.edu> wrote:
>
> On 1/4/2014 7:42 PM, Peter Turner wrote:
>>
>> Hi, I hope the following question is appropriate for the list; reflects
>> that I've yet to use R and have limited statistical sensibility.
>>
>> I've two metal ion concentration data sets, one each for two nearby
>> watercourses recorded over the same period (2008 to 2012), for which the
>> sampling dates differ across that period.
>>
>> Would R's cor (stats) function be suitable to obtain a correlation measure
>> for the Y data sets?
>
> Probably if it is paired on years. Start by plotting your data as scatter
> plot to check linearity. To read the help:
> ?plot
> Then read ?cor and note the method argument.  By default cor() gives you
> Pearson correlation coefficients, but depending on the nature of your data,
> non-parametric Spearman or Kendall coefficients might be more appropriate.
>>
>> Is there a better or more appropriate option?
>>
>>
>> Thanks, Peter
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org 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.
>
>
> ______________________________________________
> R-help at r-project.org 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