PrinceJavier / causal_ccm

Package implementing Convergent Cross Mapping for causality inference in dynamical systems
MIT License
38 stars 9 forks source link

If I need to study multiple lag times how should I accomplish this? For example tau=2, 3 or 100 #6

Open Phoebe715 opened 8 months ago

Phoebe715 commented 8 months ago

If I need to study multiple lag times how should I accomplish this? For example tau=2, 3 or 100.

Phoebe715 commented 8 months ago

What should be the explanation if r is negative

scibanez commented 8 months ago

What should be the explanation if r is negative

the r being reported is the pearson correlation coefficient. negative correlations imply that the variables are inversely related (i.e., as x increases, y decreases.)

PrinceJavier commented 8 months ago

You can change the tau argument - ccm(X, Y, tau, E, L) you can write a for loop for example,

for tau in [1, 2, 3]:
   ccm_instance = ccm(X, Y, tau, E, L)
   # rest of your code
PrinceJavier commented 8 months ago

As mentioned by scibanez, negative r means inversely related. in the context of CCM, this just means there is no causal relationship between the two. You want an r that is positive and significant

PrinceJavier commented 7 months ago

@Phoebe715 To add to my previous explanation on negative r, in the supplemental materials of Sugihara et al's paper, they explained that negative r are truncated to 0. I'm planning to include this as a feature - truncation of the correlation value to only be between 0 and 1