Thresholds of Synchrony in R

classic Classic list List threaded Threaded
2 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Thresholds of Synchrony in R

Tania Bird
Hi all,
Apologies if this is more a stats question than an R question but I do need
help with R for the solution.

I'm calculating the degree of synchrony of population fluctuations through
time in a community, based on Loreau & Mazencourt 2008 paper.
Loreau, Michel, and Claire de Mazancourt. (2008) "Species synchrony and its
drivers: Neutral and nonneutral community dynamics in fluctuating
environments." The American Naturalist 172, no. 2: E48-66.
doi:10.1086/589746.

I am using this code:

dat = cbind(sp1 = rnorm(100, 10, 2), sp2 = rnorm(100, 10, 2))
    #Two species with random independent abundance sampled 100 times.
V = var(dat)   # variance-covariance matrix for all species
    # calculate synchrony index from covariance matrix
synchrony = function(V) {
d = sqrt(diag(V))
sum(V) /sum(d%*%t(d))
}

S = synchrony(V)

S runs from 0 (total Asynchrony) to 1 (total Synchrony) with 0.5 = random
or no synchrony as described by the authors.

I am wondering if there is a to calculate a threshold or value of S at
which I can say that there is "significant Asynchrony in this community" or
 significant Synchrony in this community". For example is 0.3 asynchronous
or not really ?

Should this threshold based on the data range or the variation itself?
In which case how would I code this calculation?

Or should I just say that anything <0.25 is significantly/very
Asynchronous?
In which case how can I generate a column to say
 if S <0.25 its asynchronous or if its >0.75 its synchronous?

Thanks for your feedback
Tania


Tania Bird MSc
PhD Student,
Geo Ecology Lab
Ben Gurion University

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Thresholds of Synchrony in R

Zoltan Botta-Dukat-2
Dear Tania,

I suspect that there is no general threshold.
You can check significance of departure from 0.5 by randomization test:
1)  randomize your data,
2) calculate synchrony for the randomized data
3) repeat step 1 and 2 many times (at least 999)
4) p-value = min(# cases where observed S is higher than random; # cases
where observed S is lower than random)/(number of randoms +1)

There are (at least) two ways of randomization:
- simply shuffling values within one species' time series - it is
simple, but destroys the temporal autocorrelation within time series
- shifting values within one one species' time series (as it would be
circular data) - it preserves the autocorrelation, so I would use it.

Best wishes,

Zoltan

2017.08.02. 18:58 keltez�ssel, Tania Bird �rta:

> Hi all,
> Apologies if this is more a stats question than an R question but I do need
> help with R for the solution.
>
> I'm calculating the degree of synchrony of population fluctuations through
> time in a community, based on Loreau & Mazencourt 2008 paper.
> Loreau, Michel, and Claire de Mazancourt. (2008) "Species synchrony and its
> drivers: Neutral and nonneutral community dynamics in fluctuating
> environments." The American Naturalist 172, no. 2: E48-66.
> doi:10.1086/589746.
>
> I am using this code:
>
> dat = cbind(sp1 = rnorm(100, 10, 2), sp2 = rnorm(100, 10, 2))
>      #Two species with random independent abundance sampled 100 times.
> V = var(dat)   # variance-covariance matrix for all species
>      # calculate synchrony index from covariance matrix
> synchrony = function(V) {
> d = sqrt(diag(V))
> sum(V) /sum(d%*%t(d))
> }
>
> S = synchrony(V)
>
> S runs from 0 (total Asynchrony) to 1 (total Synchrony) with 0.5 = random
> or no synchrony as described by the authors.
>
> I am wondering if there is a to calculate a threshold or value of S at
> which I can say that there is "significant Asynchrony in this community" or
>   significant Synchrony in this community". For example is 0.3 asynchronous
> or not really ?
>
> Should this threshold based on the data range or the variation itself?
> In which case how would I code this calculation?
>
> Or should I just say that anything <0.25 is significantly/very
> Asynchronous?
> In which case how can I generate a column to say
>   if S <0.25 its asynchronous or if its >0.75 its synchronous?
>
> Thanks for your feedback
> Tania
>
>
> Tania Bird MSc
> PhD Student,
> Geo Ecology Lab
> Ben Gurion University
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

--

Botta-Duk�t Zolt�n                                Zolt�n BOTTA-Duk�t
------------------------------------------------------------------------------------
�kol�giai �s Botanikai Int�zet                    Institute of Ecology and Botany
Magyar Tudom�nyos Akad�mia                        Hungarian Academy of Sciences
�kol�giai Kutat�k�zpont                           Centre for Ecological Research
--------------------------------------------------------------------------------------------
2163. V�cr�t�t, Alkotm�ny u. 2-4.                 H-2163 V�cr�t�t, Alkom�ny u. 2-4.,HUNGARY
tel: +36 28 360122/138                            Phone: +36 28 360122/138
fax: +36 28 360110                                Fax +36 28 360110
[hidden email]                [hidden email]
http://okologia.mta.hu/Botta-Dukat.Zoltan         http://okologia.mta.hu/en/Zoltan.BOTTA-DUKAT

*New book:*
Theory-Based Ecology; A Darwinian approach
Authors: Liz P�sztor, Zolt�n Botta-Duk�t, Gabriella Magyar, Tam�s
Cz�r�n, and G�za Mesz�na
Available at Amazon
<https://www.amazon.com/Theory-Based-Ecology-Darwinian-Liz-Pasztor/dp/0199577862/ref=sr_1_1?s=books&ie=UTF8&qid=1467644770&sr=1-1&refinements=p_27%3ATamas+Czaran>,
in most major bookstores, or directly from Oxford University Press
<https://global.oup.com/academic/product/theory-based-ecology-9780199577866?lang=en&cc=gb>
Companion website: http://tbe.elte.hu/

        [[alternative HTML version deleted]]


_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Loading...