Closed ManuelPopp closed 9 months ago
Hi Manuel. I forwarded your message to Pierre Legendre who implemented the function but do not have a github account. I come back when I receive his answer.
Cheers
Hi together, thank you a lot for your fast replies. I understood that there are different things calculated by beta.div.comp and beta.multi and that the calculation by beta.div.comp is based on the pairwise dissimilarity measures, as I showed in my example. The main question was why that is and, since there are different results: which one to use. As P. Legendre stated "Do NOT use function beta.pair.R available in betapart". I take this note is with regard to the purpose of calculating multi-site dissimilarities. Baselga (2012; doi: 10.1111/j.1466-8238.2011.00756.x) stressed that multiple-site dissimilarity measures have to be used when more then two sites are compared, i.e., we have to use beta.multi(), which produces different results than sum(pairwise_diversity_matrix) / (n * (n - 1)). I suppose this means that beta.div.comp()$part should not be used for multiple-site beta diversity measures, since it is also based on the pairwise diversity matrices. Did I now understand correctly?
@sdray With regard to the code used in adespatial (and in betapart), I now know that the differences arise from different equations implemented (for partly different purpose). This means you can basically close this issue here, since all coding-related questions are solved.
@legendre Baselga's betapart::beta.multi() description states "Computes 3 multiple-site dissimilarities accounting for the spatial turnover and the nestedness components of beta diversity". And "beta.SOR = value of the overall beta diversity, measured as Sorensen dissimilarity". You say "I don't read measures of variance, or beta diversity, in [the beta.JAC and beta.SOR] equations." To a student who has not followed the debate about beta diversity (partitioning) and related indices from the beginning, this is a bit confusing. I assume, Baselga has a wider view of the term. Anyways, I will probably have to carefully read through the debate (again) from the start. Thank you for your contributions here; it helped me gain a better understanding.
Best regards, Manuel
Hello, sorry for the trivial question, but do you know the reason why adespatial form the CRAN repository was removed? Thanks in advance.
Hi, I have been ripleyed. My university installed an email filtering system to reduce spams. B. Ripley sent me an email and received a message from the filterig system. Then, he decides to remove my packages as the system violates the CRAN policy. I will resubmit the packages soon with a new email address. As an alternative, you can install the version from github. Sorry for the inconvenience.
Thank you very much for the quick answer. I hope it is resolved for the good of the community đŸ˜„. I have already downloaded it from github, thanks! Regards
@mar-iana FYI, adespatial
is back on CRAN since October 12th :-)
I just found a question on Researchgate, why
adespatial
'sbeta.div.comp(..., coef="BJ", quant=FALSE)
andbetapart
'sbeta.multi(..., index.family="jaccard")
return different output, despite one would assume the functions run similar calculations, given the index family is set to"jaccard"
and the method of Baselga et al is used.So I tested the following:
Resulting in:
Whereas when I now ran
it returns
Obviously, the values are not in the same order, but also they are completely different.
So I went to github and copied the code from the relevant functions of both packages. I changed variable names where variables had a pendant in the other package, to indicate which values or parts of the script are basically the same for both packages. This is the result:
As you can see, there are some basic equations (the ones described in the relevant papers on the partitioning of beta diversity), which are similar for both approaches. However, the
adespatial
function first calculates some diversity matrices and then sums them up while thebetapart
approach first summarises the input matrix to obtain single values and then applies the equations for betadiversity decomposition.Now, my question would be: Why are there different outputs? Are there errors in the code, or are the functions supposed to behave differently? In case the differences are intended, could you please elaborate why or add to the documentation?