Alternative to Spearman correlations in R when data is not independent?


New Member
Hi everyone,

I'm working with a dependent variable which is the number of individuals of an species. The way in which we counted the individuals is along transects, so we have number of individuals in at least 7 plots at different distance from a plantation (from 0-20 m, 20-40 m, 40-60 m, etc). I wanted to correlate the number of individuals of each plot to environmental variables so I first performed Spearman correlations in R. However, it seems that in the way that we performed our study, our variable of interest (number of individuals) is not independent as in each plot It could be influenced by values of other close plots.

So the question is: Which analysis do you reccommend me to perform in R to replace the Spearman correlations and avoid the problem of the non-independent data?