Showing posts with label Papers. Show all posts
Showing posts with label Papers. Show all posts

Wednesday, October 26, 2011

Two-sex demographic models in R

Recology has moved, go to http://recology.info/2011/10/two-sex-demographic-models-in-r

Tom Miller (a prof here at Rice) and Brian Inouye have a paper out in Ecology (paper, appendices) that confronts two-sex models of dispersal with empirical data.

They conducted the first confrontation of two-sex demographic models with empirical data on lab populations of bean beetles Callosobruchus.

Their R code for the modeling work is available at Ecological Archives (link here).


Here is a figure made from running the five blocks of code in 'Miller_and_Inouye_figures.txt' that reproduces Fig. 4 (A-E) in their Ecology paper (p = proportion female, Nt = density).  Nice!
A: Saturating density dependence
B: Over-compensatory density dependence
C: Sex-specific gamma's (but bM=bF=0.5)
D: Sex-specific b's (but gammaM=gammaF=1)
E: Sex-specific b's (but gammaM=gammaF=2)


Thursday, October 13, 2011

Phylogenetic community structure: PGLMMs

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...



Tuesday, June 21, 2011

PLoS journals API from R: "rplos"

The Public Libraries of Science (PLOS) has an API so that developers can create cool tools to access their data (including full text papers!!).

Carl Boettiger at UC Davis and I are working on R functions that use the PLoS API. See our code on Github here. See the wiki at the Github page for examples of use. We hope to deploy rplos as a package someday soon. Please feel free to suggest changes/additions rplos in the comments below or on the Github/rplos site.

Get your own API key here.

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).

Sunday, March 13, 2011

Species abundance distributions and basketball

A post over at the Phased blog (http://www.nasw.org/users/mslong/) highlights a recent paper in PLoS One by Robert Warren et al. Similar results were obtained in a 2007 Ecology Letters paper by Nekola and Brown, who showed that abundance distributions found in ecology are similar to those found for scientific citations, Eastern North American precipitation, among other things. A similar argument was made by Nee et al. in 1991 (in the journal PRSL-B). The author of the blog appears to agree with the outcome of the Warren et al. study.

I tend to disagree.

In the field of graphs/networks, many networks (social, sexual intercourse among humans, etc.) are found to have similar statistical properties to those of ecological networks (food webs, interactions among mutualists, etc.). However, just because these networks have similar statistical properties does not mean that the statistical properties of ecological networks have no biological meaning.

They make the argument that the common SAD fit may be an artifact of large data sets alone. However, I don't see any explanation of why they think large data sets is a valid explanation of SADs. Surely SAD's are fit to varying sizes of datasets. The problem with small datasets is lack of statistical power to detect a particular pattern, but surely you can get a fit for a particular SAD to a small dataset.

There are ecological mechanistic theories behind different SAD models. They argue that because very similar SADs are found in ecological and non-ecological datasets alike one option is that a universal mechanism structures ecological and non-ecological data (with the mechanism unknown in both). Why can't the same SAD pattern be generated by different mechanisms?

Are Warren et al, Nekola, and Nee right in questioning the utility of SADs? Questioning our theories and ideas only makes the theories better in the end by weeding out shortcomings, etc.


ResearchBlogging.org
Warren, R., Skelly, D., Schmitz, O., & Bradford, M. (2011). Universal Ecological Patterns in College Basketball Communities PLoS ONE, 6 (3) DOI: 10.1371/journal.pone.0017342

Tuesday, February 1, 2011

Plants are less sex deprived when next to closely related neighbors

A new early online paper in American Journal of Botany by Risa Sargent and colleagues suggests that plants are less sex deprived (pollen limited) in vernal pools that have more closely related plant species.

Vernal pools are (at least in my experience) small (to quite large) depressions that fill up with water with winter rains, and dry out completely in the summer. Vernal pool adapted plants flower in rings down the pool as the water dries up. Aquatic invertebrates and some herps can last through the summer by burrowing in the soil.

The study did hand pollination experiments with a focal species, Lasthenia fremontii. They examined the relationship between these pollen limitation experiments and the relatedness of L. fremontii to the rest of the plant community in each pool.

Plant species richness was not related to pollen limitation. Thus, at least in their study with vernal pools in California, relatedness to your plant neighbors has a greater impact than plant richness.

The great thing about vernal pools is that they are truly terrestrial islands of habitat, surrounded by inhospitable habitat for pool species. Many vernal pools are created artificially for habitat conservation easements (e.g., here). Perhaps someone can experimentally manipulate phylogenetic diversity in artificially created pools to really get at the causal links.






p.s. Ok, this post is not terribly R related, except for that this paper used R for some of their statistics.

Wednesday, January 5, 2011

New approach to analysis of phylogenetic community structure

Anthony Ives, of University of Wisconsin-Madison, and Matthew Helmus of the Xishuangbanna Tropical Botanical Garden, present a new statistical method for analyzing phylogenetic community structure in an early view paper in Ecological Monographs. See the abstract here.

Up to now, most phylogenetic community structure papers have calculated metrics and used randomization tests to determine if observed metrics are different from random. The approach of Ives and Helmus fits models to observed data, instead of calculating single metrics.

Furthermore, their approach gets around the limitation in studies of phylogenetic community structure of conducting many separate statistical tests, thereby inflating your chances of finding a significant effect purely by chance.

Their approach uses generalized linear mixed models (GLMMs). They provide Matlab code for running these models, but R code will be available in the Picante package in the future.