Vignette - Appropriate E for CCM in Big Biodiversity Example
Closed this issue · 3 comments
Within the vignette, in the Big Biodiversity example, the CCM section uses the bestE object to choose the correct E.
I believe the indices for these calls are incorrect. For example, the vignette says the following:
no_xmap_inv <- ccm(composite_ts, lib = segments, pred = segments, E = bestE[4], ...
inv_xmap_no <- ccm(composite_ts, lib = composite_lib, pred = composite_pred, E = bestE[1] ...
but, bestE looks like this:
AbvBioAnnProd noh020tot invrichness precipmm
5 5 4 2
The indices used are neither the lib or the target columns. I believe the indices should be bestE[3] and bestE[2], respectively, to line up with the putative causal process (the target column). I think this error carries through this section.
In the vignette at https://cran.r-project.org/web/packages/rEDM/vignettes/rEDM_tutorial.html, the indices for the first example are correct, but the second example is incorrect. I think you may have just copied the 4 and 1 indices from the first example down to the second.
Thanks for this great package and documentation!
Nice catch! I haven't had a chance to look over all the examples in detail.
Ideally, this should actually be rewritten to use named columns instead of the numerical indices...
If you want to give this a go, you're welcome to fork and send me a pull request. Otherwise, it might take me a while to get around to it myself.
I will fork and send a pull request this week.