Recology has moved, go to http://recology.info/2011/10/phylogenetic-community-structure-pglmms
So, I've blogged about this topic before, way back on 5 Jan this year.
Matt Helmus, a postdoc in the Wootton lab at the University of Chicago, published a paper with Anthony Ives in Ecological Monographs this year (abstract here). The paper addressed a new statistical approach to phylogenetic community structure.
As I said in the original post, part of the power of the PGLMM (phylogenetic generalized linear mixed models) approach is that you don't have to conduct quite so many separate statistical tests as with the previous null model/randomization approach.
Their original code was written in Matlab. Here I provide the R code that Matt has so graciously shared with me. There are four functions and a fifth file has an example use case. The example and output are shown below.
Look for the inclusion of Matt's PGLMM to the picante R package in the future.
Here are links to the files as GitHub gists:
PGLMM.data.R: https://gist.github.com/1278205
PGLMM.fit.R: https://gist.github.com/1284284
PGLMM.reml.R: https://gist.github.com/1284287
PGLMM.sim.R: https://gist.github.com/1284288
PGLMM_example.R: https://gist.github.com/1284442
Enjoy!
The example
..and the figures...
Recology HAS MOVED TO http://recology.info/. To get to the same blog post on the new site replace the http://r-ecology.blogspot.ca/ with http://recology.info/, but with the same ending, e,g. /2011/12/weecology-can-has-new-mammal-dataset.html (except remove the .html at the end)
Showing posts with label Statistics. Show all posts
Showing posts with label Statistics. Show all posts
Thursday, October 13, 2011
Friday, June 17, 2011
Tuesday, June 7, 2011
How to fit power laws
A new paper out in Ecology by Xiao and colleagues (in press, here) compares the use of log-transformation to non-linear regression for analyzing power-laws.
They suggest that the error distribution should determine which method performs better. When your errors are additive, homoscedastic, and normally distributed, they propose using non-linear regression. When errors are multiplicative, heteroscedastic, and lognormally distributed, they suggest using linear regression on log-transformed data. The assumptions about these two methods are different, so cannot be correct for a single dataset.
They will provide their R code for their methods once they are up on Ecological Archives (they weren't up there by the time of this post).
They suggest that the error distribution should determine which method performs better. When your errors are additive, homoscedastic, and normally distributed, they propose using non-linear regression. When errors are multiplicative, heteroscedastic, and lognormally distributed, they suggest using linear regression on log-transformed data. The assumptions about these two methods are different, so cannot be correct for a single dataset.
They will provide their R code for their methods once they are up on Ecological Archives (they weren't up there by the time of this post).
Subscribe to:
Posts (Atom)


