[R] very basic series correlation question

Robert Baer rbaer at atsu.edu
Sun Jan 5 18:30:41 CET 2014


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.




More information about the R-help mailing list