Friday, January 20, 2017

True, False, or Neither? Hypothesis testing in ecology.

How science is done is the outcome of many things, from training (both institutional and lab specific), reviewers’ critiques and requests, historical practices, subdiscipline culture and paradigms, to practicalities such as time, money, and trends in grant awards. ‘Ecology’ is the emergent property of thousands of people pursuing paths driven by their own combination of these and other motivators. Not surprisingly, the path of ecology sways and stalls, and in response papers pop up continuing the decades old discussion about philosophy and best practices for ecological research.

A new paper from Betini et al. in the Royal Society Open Science contributes to this discussion by asking why ecologists don’t test multiple competing hypotheses (allowing efficient falsification or “strong inference” a la Popper). Ecologists rarely test multiple competing hypothesis test: Betini et al. found that only 21 of 100 randomly selected papers tested 2 hypotheses, and only 8 tested greater than 2. Multiple hypothesis testing is a key component of strong inference, and the authors hearken to Platt’s 1964 paper “Strong Inference” as to why ecologists should be adopting adopt strong inference. 
Platt
From Platt: “Science is now an everyday business. Equipment, calculations, lectures become ends in themselves. How many of us write down our alternatives and crucial experiments every day, focusing on the exclusion of a hypothesis? We may write our scientific papers so that it looks as if we had steps 1, 2, and 3 in mind all along. But in between, we do busywork. We become "method-oriented" rather than "problem-oriented." We say we prefer to "feel our way" toward generalizations.
[An aside to say that Platt was a brutally honest critic of the state of science and his grumpy complaints would not be out of place today. This makes reading his 1964 paper especially fun. E.g. “We can see from the external symptoms that there is something scientifically wrong. The Frozen Method. The Eternal Surveyor. The Never Finished. The Great Man With a Single Hypothesis. The Little Club of Dependents. The Vendetta. The All-Encompassing Theory Which Can Never Be Falsified.”]
Betini et al. list a number of common practical intellectual and practical biases that likely prevent researchers from using multiple hypothesis testing and strong inference. These range from confirmation bias and pattern-seeking to the fallacy of factorial design (which leads to unreasonably high replication requirements including of uninformative combinations). But the authors are surprisingly unquestioning about the utility of strong inference and multiple hypothesis testing for ecology. For example, Brian McGill has a great post highlighting the importance and difficulties of multi-causality in ecology - many non-trivial processes drive ecological systems (see also). 

Another salient point is that falsification of hypotheses, which is central to strong inference, is especially unserviceable in ecology. There are many reasons that an experimental result could be negative and yet not result in falsification of a hypothesis. Data may be faulty in many ways outside of our control, due to inappropriate scales of analyses, or because of limitations of human perception and technology. The data may be incomplete (for example, from a community that has not reached equilibrium); it may rely inappropriately on proxies, or there could be key variables that are difficult to control (see John A. Wiens' chapter for details). Even in highly controlled microcosms, variation arises and failures occur that are 'inexplicable' given our current ability to perceive and control the system.

Or the data might be accurate but there are statistical issues to be concerned about, given many effect sizes are small and replication can be difficult or limited. Other statistical issues can also make falsification questionable – for example, the use of p-values as the ‘falsify/don’t falsify’ determinant, or the confounding of AIC model selection with true multiple hypothesis testing.

Instead, I think it can be argued that ecologists have relied more on verification – accumulating multiple results supporting a hypothesis. This is slower, logically weaker, and undoubtedly results in mistakes too. Verification is most convincing when effect sizes are large – e.g. David Schindler’s lake 226, which provided a single and principal example of phosphorus supplementation causing eutrophication. Unfortunately small effect sizes are common in ecology. There also isn’t a clear process for dealing with negative results when a field has relied on verification - how much negative evidence is required to remove a hypothesis from use, versus just lead to caveats or modifications?

Perhaps one reason Bayesian methods are so attractive to many ecologists is that they reflect the modified approach we already use - developing priors based on our assessment of evidence in the literature, particularly verifications but also evidence that falsifies (for a better discussion of this mixed approach, see Andrew Gelman's writing). This is exactly where Betini et al.'s paper is especially relevant – intellectual biases and practical limitations are even more important outside of the strict rules of strong inference. It seems important as ecologists to address these biases as much as possible. In particular, better training in philosophical, ethical and methodological practices; priors, which may frequently be amorphous and internal, should be externalized using meta-analyses and reviews that express the state of knowledge in unbiased fashion; and we should strive to formulate hypotheses that are specific and to identify the implicit assumptions.

Friday, January 13, 2017

87 years ago, in ecology

Louis Emberger was an important French plant ecologist in the first half of the last century, known for his work on the assemblages of plants in the mediterranean.

For example, the plot below is his published diagram showing minimum temperature of the coolest month versus a 'pluviometric quotient' capturing several aspects of temperature and precipitation from:

Emberger; La végétation de la région méditerranienne. Rev. Gén. Bot., 42 (1930)

Note this wasn't an unappreciated or ignored paper - it received a couple hundred citations, up until present day. Further, updated versions have appeared in more recent years (see bottom).

So it's fascinating to see the eraser marks and crossed out lines, this visualisation of scientific uncertainty. The final message from this probably depends on your perspective and personality:
  • Does it show that plant-environment modelling has changed a lot or that plant environmental modelling is still asking about the same underlying processes in similar ways?
  • Does this highlight the value of expert knowledge (still cited) or the limitations of expert knowledge (eraser marks)? 
It's certainly a reminder of how lucky we are to have modern graphical software :)



E.g. updated in Hobbs, Richard J., D. M. Richardson, and G. W. Davis. "Mediterranean-type ecosystems: opportunities and constraints for studying the function of biodiversity." Mediterranean-Type Ecosystems. Springer Berlin Heidelberg, 1995. 1-42.











Thanks to Eric Garnier, for finding and sharing the original Emberger diagram and the more recent versions.

Monday, December 19, 2016

2016 holiday caRd

Once more, tis the season! Hope you had an excellent year of science and R coding. This card requires the igraph library - it (loosely) relies on an infection (S-I model) moving through a network :-)

To view season's greetings from 2016:
Go to the gist and download the file directly ("download gist") or hit "raw" and copy/paste. Or, copy and paste the code below.

Users of Rstudio will not be able to see the animation, so base R is highly recommended.

For those not able or willing to run the card, you can view it and the past years' cards here!

Tuesday, December 13, 2016

150 years of 'ecology'

The word ‘ecology’ was coined 150 years ago by Ernst Haeckel in his book Generelle Morphologie der Organismen published in 1866. Mike Begon gave a fascinating talk at the British Ecological Society meeting in Liverpool on what ecology as meant over these past 150 years and what it should mean in the future. The description of ecology that follows, is largely taken from Begon’s remarks.

Ernst Haeckel, 1860
Haeckel defined ecology as ‘the science of the relations of organism to its surrounding outside world (environment)’, which is in obvious contrast to the then burgeoning science of physiology, which was concerned with the world inside of an organism. Interestingly, the first 50 years of this new field of ecology was dominated by the study of plants. In America, Clements, while in the UK, Tansley, both saw ecology as the description of patterns of plant in relation to the outside world. In many ways, this conception of ecology was what Haeckel had envisioned.

Frederic Clements

However, by the 1960s, the domain of ecology began to grow rapidly. Ecologists like Odum used ‘ecology’ to mean the structure and function of ecosystems, while others focussed on the abundance and distribution of species. By this time ecology had grown to encapsulate all aspects of organismal patterns and functions in nature.

The post-60s period saw another expansion -namely the value of ecology. While Begon points out that text books, including his, focussed on the science of ecology in its pure form, many were ignoring the fact that ecology had/has important repercussions for how humanity will need to deal with the massive environmental impacts we’ve had on Earth’s natural systems. That is, the science of ecology can provide the foundation by which applied management solutions can be built. I personally believe that applied ecology has only just begun its ascension to being the most important element of ecological science (but I’m biassed -being the Executive Editor of the Journal of Applied Ecology). Just like how human physiology has become problem oriented, often focussed on human disease, ecology will too become more problem oriented and focus on our sick patients.


Begon went on to say what ecology should be in the near future. He juxtaposed the fact and truth based necessity of science to the post-truth Brexit/Trump era we now find ourselves in. If ecologists and scientists are to engage the public, and alter self-destructive behaviours, it cannot be with logic and evidence alone. He argued that we need to message like those post-truthers. Use metaphors, simple messages that are repeated, repeated, and repeated.

Friday, November 25, 2016

Can coexistence theories coexist?

These days, the term ‘niche’ manages to cover both incredibly vague and incredibly specific ideas. All the many ways of thinking about an organism’s niche fill the literature, with various degrees of inter-connection and non-independence. The two dominant descriptions in modern ecology (last 30 years or so) are from ‘contemporary niche theory’ and ‘modern coexistence theory’. Contemporary niche theory is developed from consumer-resource theory, where organisms' interactions occur via usage of shared resources. (Though it has expanded to incorporate predators, mutualists, etc), Analytical tools such as ZNGIs and R* values can be used to predict the likelihood of coexistence (e.g. Tilman 1981, Chase & Leibold 2003). Modern coexistence theory is rooted in Peter Chesson’s 2000 ARES review (and earlier work), and describes coexistence in terms of fitness and niche components that allow positive population growth.

On the surface these two theories share many conceptual similarities, particularly the focus on measuring niche overlap for coexistence. [Chesson’s original work explicitly connects the R* values from Tilman’s work to species’ fitnesses in his framework as well]. But as a new article in Ecological Monographs points out, the two theories are separated in the literature and in practice. The divergence started with their theoretical foundations: niche theory relied on consumer-resource models and explicit, mechanistic understanding of organisms’ resource usage, while coexistence theory was presented in terms of Lotka-Volterra competition models and so phenomenological (e.g. the mechanisms determining competition coefficients values are not directly measured). The authors note, “This trade-off between mechanistic precision (e.g. which resources are regulating coexistence?) and phenomenological accuracy (e.g. can they coexist?) has been inherited by the two frameworks….”

There are strengths and weaknesses to both approaches, and both have been used in important ecological studies. So it's surprising that they are rarely mentioned in the same breathe. Letten et al. answer an important question: when directly compared, can we translate the concepts and terms from contemporary niche theory into modern coexistence theory and vice versa?

Background - when is coexistence expected? 
Contemporary niche theory (CNT) (for the simplest case of two limiting resources): for each species, you must know the consumption or impact they have on each resource; the ratio at which the two resources are supplied, and the ZNGIs (zero net growth isoclines, which delimit the resource conditions a species can grow in). Coexistence occurs when the species are better competitors for different resources, when each species has a greater impact on their more limiting resource, and when the supply ratio of the two resources doesn’t favour one species over the other. (simple!)

For modern coexistence theory (MCT), stable coexistence occurs when the combination of fitness differences and niche differences between species allow both species to maintain positive per capita growth rates. As niche overlap decreases, increasingly small fitness differences are necessary for coexistence.

Fig 1, from Letten et al. The criteria for coexistence under modern coexistence theory (a) and contemporary niche theory (b).  In (a), f1 and f2 reflect species' fitnesses. In (b) "coexistence of two species competing for two substitutable resources depends on three criteria: intersecting ZNGIs (solid red and blue lines connecting the x- and y-axes); each species having a greater impact on the resource from which it most benefits (impact vectors denoted by the red and blue arrows); and a resource supply ratio that is intermediate to the inverse of the impact vectors (dashed red and blue lines)."

So how do these two descriptions of coexistence relate to each other? Letten et al. demonstrate that:
1) Changing the supply rates of resources (for CNT) impacts the fitness ratio (equalizing term in MCT). This is a nice illustration of how the environment affects the fitness ratios of species in MCT.

2) Increasing overlap of the impact niche between two species under CNT is consistent with increasing overlap of modern coexistence theory's niche too. When two species have similar impacts on their resources, there should be very high niche overlap (weak stabilizing term) under MCT too.

3) When two species' ZNGI area converge (i.e. the conditions necessary for positive growth rates), it affects both the stabilizing and equalizing terms in MCT. However, this has little meaningful effect on coexistence (since niche overlap increases, but fitness differences decrease as well).

This is a helpful advance because Letten et al. make these two frameworks speak the same (mathematical) language. Further, this connects a phenomological framework with a (more) mechanistic one. The stabilizing-equalizing concept framework (MCT) has been incredibly useful as a way of understanding why we see coexistence, but it is not meant to predict coexistence in new environments/with new combinations of species. On the other hand, contemporary niche theory can be predictive, but is unwieldy and information intensive. One way forward may be this: reconciling the similarities in how both frameworks think about coexistence.

Letten, Andrew D., Ke, Po-Ju, Fukami, Tadashi. 2016. Linking modern coexistence theory and contemporary niche theory. Ecological Monographs: 557-7015. http://dx.doi.org/10.1002/ecm.1242
(This is a monograph for a reason, so I am just covering the major points Letten et al provide in the paper. It's definitely worth a careful read as well!).

Wednesday, November 16, 2016

The value of ecology through metaphor

The romanticized view of an untouched, pristine ecosystem is unrealistic; we now live in a world where every major ecosystem has been impacted by human activities. From pollution and deforestation, to the introduction of non-native species, our activity has influenced natural systems around the globe. At the same time, ecologists have largely focused on ‘intact’ or ‘natural’ systems in order to uncover the fundamental operations of nature. Ecological theory abounds with explanations for ecological patterns and processes. However, given that the world is increasingly human dominated and urbanized, we need a better understanding of how biodiversity and ecosystem function can be sustained in the presence of human domination. If our ecological theories provide powerful insights into ecological systems, then human dominated landscapes are where they are desperately needed to solve problems.
From the Spectator

This demand to solve problems is not unique to ecology, other scientific disciplines measure their value in terms of direct contributions to human well-being. The most obvious is human biology. Human biology has transitioned from gross morphology, to physiology, to molecular mechanisms controlling cellular function, and all of these tools provide powerful insights into how humans are put together and how our bodies function. Yet, as much as these tools are used to understand how healthy people function, human biologists often stay focussed on how to cure sick people. That is, the proximate value ascribed to human biology research is in its ability to cure disease and improve peoples’ lives. 


In Ecology, our sick patients are heavily impacted and urbanized landscapes. By understanding how natural systems function can provide insights into strategies to improve degraded ecosystems. This value of ecological science manifests itself in shifts in funding and publishing. We now have synthesis centres that focus on the human-environment interaction (e.g., SESYNC). The journals that publish papers that provide applied solutions to ecological and environmental problems (e.g., Journal of Applied Ecology, Frontiers in Ecology and the Environment, etc.) have gained in prominence over the past decade. But more can be done.


We should keep the ‘sick patient’ metaphor in the back of our minds at all times and ask how our scientific endeavours can help improve the health of ecosystems. I was once a graduate student that pursued purely theoretical tests of how ecosystems are put together, and now I am the executive editor of an applied journal. I think that ecologists should feel like they can develop solutions to environmental problems, and that their underlying science gives them a unique perspective to improving the quality of life for our sick patients. 

Sunday, November 6, 2016

What is a community ecologist anyways?

I am organizing a 'community ecology' reading group, and someone asked me whether I didn’t think focusing on communities wasn’t a little restrictive. And no. The thought never crossed my mind. Which I realized is because I internally define community ecology as a large set of things including ‘everything I work on’ :-) When people ask me what I do, I usually say I’m a community ecologist.

Obviously community ecology is the study of ecological communities [“theoretical ideal the complete set of organisms living in a particular place and time as an ecological community sensu lato”, Vellend 2016]. But in practice, it's very difficult to define the boundaries of what a community is (Ricklefs 2008), and the scale of time and space is rather flexible.

So I suppose my working definition has been that a community ecologist researches groups of organisms and understands them in terms of ecological processes. There is flexibility in terms of spatial and temporal scale, number and type of trophic levels, interaction type and number, or response variables of interest. It’s also true that this definition could be encompass much of modern ecology…

On the other hand, a colleague argued that only the specific study of species interactions should be considered as ‘community ecology’: e.g. pollination ecology, predator-prey interactions, competition, probably food web and multi-trophic level interactions. 

Perhaps my definition is so broad as to be uninformative, and my colleague's is too narrow to include all areas. But it is my interest in community ecology that leads me to sometimes think about larger spatial and temporal scales. Maybe that's what community ecologists have in common: the flexibility needed to deal with the complexities of ecological communities.

Monday, October 17, 2016

Reviewing peer review: gender, location and other sources of bias

For academic scientists, publications are the primary currency for success, and so peer review is a central part of scientific life. When discussing peer review, it’s always worth remembering that since it depends on ‘peers’, broader issues across ecology are often reflected in issues with peer review. A series of papers from Charles W. Fox--and coauthors Burns, Muncy, and Meyer--do a great job of illustrating this point, showing how diversity issues in ecology are writ small in the peer review process.

The journal Functional Ecology provided the authors up to 10 years of data on the submission, editorial, and review process (between 2004 and 2014, maximum). This data provides a unique opportunity to explore how factors such as gender and geographic local affects the peer review process and outcomes, and also how this has changed over the past decade.

Author and reviewer gender were assigned using an online database (genderize.io) that includes 200,000 names and an associated probability reflecting the genders for each name. Geographic location of editors and reviewers were also identified based on their profiles. There are some clear limitations to this approach, particularly that Asian names had to be excluded. Still, 97% of names were present in the genderize.io database, and 94% of those names were associated with a single gender >90% of the time.

Many—even most—of Fox et al.’s findings are in line with what has already been shown regarding the causes and effects of gender gaps in academia. But they are interesting, nonetheless. Some of the gender gaps seem to be tied to age: senior editors were all male, and although females make up 43% of first authors on papers submitted to Functional Ecology, they are only 25% of senior authors.

Implicit biases in identifying reviewers are also fairly common: far fewer women were suggested then men, even when female authors or female editors were identifying reviewers. Female editors did invite more female reviewers than male editors. ("Male editors selected less than 25 percent female reviewers even in the year they selected the most women, but female editors consistently selected ~30–35 percent female").  Female authors also suggested slightly more female reviewers than male authors did.

Some of the statistics are great news: there was no effect of author gender or editor gender on how papers were handled and their chances of acceptance, for example. Further, the mean score given to a paper by male and female reviewers did not differ – reviewer gender isn’t affecting your paper’s chance of acceptance. And when the last or senior author on a paper is female, a greater proportion of all the authors on the paper are female too.

The most surprising statistic, to me, was that there was a small (2%) but consistent effect of handling editor gender on the likelihood that male reviewers would respond to review requests. They were less likely to respond and less likely to agree to review, if the editor making the request is female.

That there are still observable effects of gender in peer review despite an increasing awareness of the issue should tell us that the effects of other forms of less-discussed bias are probably similar or greater. Fox et al. hint at this when they show how important the effect of geographic locale is on reviewer choice. Overwhelmingly editors over-selected reviewers from their own geographic locality. This is not surprising, since social and professional networks are geographically driven, but it can have the effect of making science more insular. Other sources of bias – race, country of origin, language – are more difficult to measure from this data, but hopefully the results from these papers are reminders that such biases can have measurable effects.

From Fox et al. 2016a. 

Thursday, October 6, 2016

When individual differences matter - intraspecific variation in 2016

Maybe it is just confirmation bias, but there seems to have been an upswing in the number of cool papers on the role of intraspecific variation in ecology. For example, three new papers highlight the importance of variation among individuals for topics ranging from conservation, coexistence, and community responses to changing environments. All are worth a deeper read.

An Anthropocene map of genetic diversity’ asks how intraspecific variation is distributed globally, a simple but important question. Genetic diversity in a species is an important predictor of their ability to adapt to changing environments. For many species, however, as their populations decline in size, become fragmented, or experience strong selection related to human activities, genetic diversity may be in decline. Quantifying a baseline for global genetic diversity is an important goal. Further, with the rise of ‘big data’ (as people love to brand it) it is now an accessible one: there are now millions of genetic sequences in GenBank and associated GPS coordinates. 
Many of the global patterns in genetic diversity agree with those seen for other forms of diversity: for example, some of the highest levels are observed in the tropical Andes and Amazonia, and there is a peak in the mid-latitudes and human presence seems to decrease genetic diversity.

From Miraldo et al. (2016): Map of uncertainty. Areas in green represent high sequence availability and taxonomic coverage (of all species known to be present in a cell). All other colors represent areas lacking important data.
The resulting data set represents ~ 5000 species, so naturally the rarest species and the least charismatic are underrepresented. The authors identify this global distribution of ignorance, highlighting just how small our big data still is.

Miraldo, Andreia, et al. "An Anthropocene map of genetic diversity." Science353.6307 (2016): 1532-1535.


In ‘How variation between individuals affects species coexistence’, Simon Hart et al. do the much needed work to answer the question of how intraspecific variation fits into coexistence theory. Their results reinforce the suggestion that in general, intraspecific variation should making coexistence more difficult, since it increases the dominance of superior competitors, and reduces species' niche differentiation. (Note this is a contrast to the argument Jim Clark has made with individual trees, eg. Clark 2010)

Hart, Simon P., Sebastian J. Schreiber, and Jonathan M. Levine. "How variation between individuals affects species coexistence." Ecology letters (2016).


The topic of evolutionary rescue is an interesting, highlighting (see work from Andy Gonzalez and Graham Bell for more details) the ability of populations to adapt to stressors and changing environments, provided enough underlying additive genetic variation and time is available. It has been suggested that phenotypic plasticity can reduce the chance of evolutionary rescue, since it reduces selection on genetic traits. Alternatively, by increasing survival time following environmental change, it may aid evolutionary rescue. Ashander et al. use a theoretical approach to explore how plasticity interacts with a change in environmental conditions (mean and predictability/autocorrelation) to affect extinction risk (and so the chance of evolutionary rescue). Their results provide insight into how the predictability of new environments, through an affect on stochasticity, in turn changes extinction risk and rescue.


Tuesday, September 20, 2016

The problematic effect of small effects

Why do ecologists often get different answers to the same question? Depending on the study, for example, the relationship between biodiversity and ecosystem function could be positive, negative, or absent (e.g. Cardinale et al. 2012). Ecologists explain this in many ways - experimental issues and differences, context dependence. However, it may also be due to an even simpler issue, that of the statistical implications of small effect sizes.

This is the point that Lemoine et al. make in an interesting new report in Ecology. Experimental data from natural systems (e.g. for warming experiments, BEF experiments) is often highly variable, has low replication, and effect sizes are frequently small. Perhaps it is not surprising we see contradictory outcomes, because data with small true effect sizes are prone to high Type S (reflect the chance of obtaining the wrong sign for an effect) and Type M (the amount by with an effect size must be overestimated in order to be significant). Contradictory results arise from these statistical issues, combined with the idea that papers that do get published early on may simply have found significant effects by chance (the Winner's Curse). 

Power reflects the chance of failing to correctly reject the null hypothesis (Ho). The power of ecological experiments increases with sample size (N), since uncertainty in data decreases with increasing N. However, if your true effect size is small, studies with low power have to significantly overestimate the effect size to have a significant p-value. This is the result of the fact that if the variation in your data is large and your effect size is small, the critical value for a significant z-score is quite large. Thus for your results to be significant, you need to observe an effect larger than this critical value, which will be much larger than the true effect size. It's a catch-22 for small effect sizes: if your result is correct, it very well may not be significant; if you have a significant result, you may be overestimating the effect size. 

From Lemoine et al. 2016. 
The solution to this issue is clearly a difficult one, but the authors make some useful suggestions. First, it's really the variability of your data, more than the sample size, that raises the Type M error. So if your data is small but beautifully behaved, this may not be a huge issue for you (but you must be working in a highly atypical system). If you can increase your replication, this is the obvious solution. But the other solutions they see are cultural shifts when we publish statistical results. As with many other, the authors suggest we move away from reliance on p-values as a pass/fail tool for results. In addition to reporting p-values, they suggest we report effect sizes and their error rates. Further, that this be done for all variables regardless of whether the results are significant. Type M error and power analyses can be reported in a fashion meant to inform interpretation of results: “However, low power (0.10) and high Type M error (2.0) suggest that this effect size is likely an overestimate. Attempts to replicate these findings will likely fail.” 

Lemoine, N. P., Hoffman, A., Felton, A. J., Baur, L., Chaves, F., Gray, J., Yu, Q. and Smith, M. D. (2016), Underappreciated problems of low replication in ecological field studies. Ecology. doi: 10.1002/ecy.1506