Comments (3)
The differences between results from FD and here is because of different formulas used in calculating RaoQ.
FD uses ade4::divc()
to calculate Rao's Q, which is (here for source code lines 564-565):
`div[i, ] <- (t(df[, i]) %*% (as.matrix(dis)^2) %*% df[, i])/2/(sum(df[, i])^2)`
See that instead of use formula
Instead, in my code, i just used the original formula
If you change the FD code, (lines 564-565 in the above url) to div[i, ] <- (t(df[, i]) %*% (as.matrix(dis)^1) %*% df[, i])
, we get the same results.
Another possible result for potential differences between results from FD and here is the many many pre-calculation data manipulations.
Thanks for your comment.
from hillr.
I've checked both of codes, and I noticed it before, Chiu and Chao 2013 formula for Q is as the Botta-Dukát 2005 (FD refers to this article for Rao's Q formula).
I don't know why FD use ^2 and /2 in it's code.
Thanks.
p.s: It will be great if you implement hill phylogenetic diversity in your package.
from hillr.
I think the FD::divc()
and ade4::divc()
used d_ij^2 and then divided 2 and sum of d_ij^2 to try to standardize Rao's Q results, so they are less dependent with the number of species. I am not sure how effective is it. But, if one will use something like null models to account for species richness, then it will be better just use the original formula
from hillr.
Related Issues (17)
- Add test files
- Update 2019 HOT 3
- object 'comm' not found HOT 1
- `hill_func` fails for all numeric traits HOT 1
- hill_func with categorical traits
- hill_func() returns same-ish values regardles of similarity HOT 6
- `hill_func` throws error when only one trait is measured
- hill_func() is returning D_q higher than species richness HOT 6
- add phylogenetic diversity HOT 1
- R session abored HOT 1
- Computing turnover and nestedness components of hill beta diversity
- Problems installing HOT 1
- div_by_sp HOT 3
- Installation instructions - dependencies HOT 5
- Reference similar R packages HOT 5
- error in `hill_taxa_parti` if sites have the same and only one species HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hillr.