Tag Archives: interaction

Don’t Let Coefficient Interpretation Make an Ass of You

Image Credit: beeveephoto, CC BY-SA 2.0, Image Cropped

Everything that ecologists do – from saving endangered species to projecting climate change impacts – requires ecological data. Sometimes that data can be hard to come by, like when you’re trying to figure out the range of a rare moss. At other times, that data can be smack bang in front of you, but impossible to measure. The depth of a lake for instance, or the surface area of a tree. Today, we’ll look at how to overcome that second situation, by using other, more easy-to-obtain covariates to provide an estimate of the property you’re looking for.

Sure interpreting coefficients in increasingly complicated regression models is challenging, but have you ever tried to weigh a donkey in the wild? It turns out it is hard to do without special equipment, so Kate Milner and Jonathan Rougier devised a way to estimate the weight using easier to obtain measurements such as height and girth (for these measurements a simple tape measure will suffice). We’ll use their data to illustrate how to interpret a variety of types of coefficients in a regression scenario.

One Predictor

Screenshot from 2020-05-18 17-23-08

We’ll start with a simple linear regression. We have our predictor variable (height) on the x scale, and the variable we’re trying to predict (weight) on the y scale. The results given on the right might seem like a simple case – the value given in the red circle indicates that when height increases, weight tends to increase by 4.55 times as much (on average). But before we jump to use that 4.55, we have to think about the units of all of the variables. In this case, weight is measured in kilograms and height is measured in centimeters. Now we have enough information to say an increase in one centimeter of a donkey’s height is associated with (note we don’t say “causes”) an increase in weight of 4.55 kilograms on average. This extra “on average” is because the model helps us understand the expected value of a donkey’s weight given its height, but there can be variability for any particular donkey.

One Predictor – Response on Log Scale

Screenshot from 2020-05-18 17-24-03

What happens if we need to apply a transformation? Now a simple case gets a little bit more complicated. If we transform the response variable (here we apply a logarithmic transformation to weight) we can still say an increase in one centimeter of a donkey’s height is associated with an increase of 0.036 in log weight on average. However, that is kind of clunky; what does log weight even mean in reality? Instead, we can back-transform the coefficient and say that an increase in one centimeter of a donkey’s height is associated with an increase of e^0.036 = 1.037 kilograms in weight on average.

Predictor on Log Scale

Screenshot from 2020-05-18 17-26-51

What if it is the predictor variable that is on the log scale? This makes things a bit more complicated because the effect of the predictor on the response is nonlinear (i.e. a one centimeter increase in height is associated with a different increase in weight depending on what the original height was). Therefore we have to talk in terms of a percentage increase rather than a fixed value increase. For example, a 1% increase in height is associated with a difference in average weight of 450.02 * log(1.01) = 4.48 kilograms.

Predictor and Response on Log Scale

Screenshot from 2020-05-18 17-27-19

If both the predictor and the response are log transformed, the effect on the response of the nonlinear relationship with a predictor is also nonlinear itself. Now both parts of our explanation need to be in terms of percentages rather than fixed numbers since their increases in absolute terms depend on their starting values. For a 1% increase in height we expect the average ratio of the weights to be 1.01^3.57 = 1.04. In other words, a 1% increase in height is associated with a 4% increase in weight. These nonlinearities can make interpretation tricky. Find more guidance on log transformation interpretation here. Similarly, if you are using logistic regression, interpretation of coefficients can also be a bit mysterious. We won’t tackle that case in this post, but you can learn more here.

Interaction Term on Discrete Covariate

Screenshot from 2020-05-18 17-32-07

The relationship between height and weight may depend on a categorical variable, like sex in this case. The coefficient on height is for a baseline category (here stallion), so an increase in height of one centimeter is associated with an increase in weight of 4.79 kilograms for a stallion. Other sex categories have an additional term to consider. For a gelding, there is an additional association, decreasing the average weight by 1.14 kilograms (the blue circle). Therefore, the overall effect of an increase in height of one centimeter is associated with an increase of 4.79 – 1.14 = 3.65 kilograms for a gelding donkey. A female has its own association as well, decreasing the average weight by 0.43 kilograms. Again, the overall effect of an increase in height of one centimeter is associated with an increase of 4.79 – 0.43 = 4.36 kilograms for a female donkey.

Multiple Predictors

Screenshot from 2020-05-18 17-33-00

Commonly we model a response variable with more than one predictor. Then the interpretation of the coefficients changes a bit. The associations must be interpreted “in the presence of” the other covariates. This means that after accounting for height, an increase in girth of one centimeter is associated with an increase in weight of 2.84 kilograms on average. Similarly, after accounting for girth, an increase in height of one centimeter is associated with an increase in weight of 0.93 kilograms.

Screenshot from 2020-05-18 17-33-40

Conceptually, this interpretation is necessary because covariates may share an association with the response. After accounting for one covariate, another covariate may have less association with the response because some of the variability in the response is already accounted for by variability in the first covariate. Above we see that height and girth are correlated with each other. Therefore some of the information that each covariate contributes to helping to understand weight is redundant in the presence of the other (this is why the coefficient on height is smaller in the multivariate model).

Interaction Term on Continuous Variable

Screenshot from 2020-05-18 17-34-52

An interaction term between two continuous variables means that the magnitude of the relationship between the first covariate and the response depends on the value of the second covariate. To better understand how the relationship between weight and height changes depending on the value of girth, we can make a conditional coefficient plot (learn more here). We can see that the relationship between weight and height gets more positive as the value of girth increases. This matches the regression output (the relevant coefficient is 0.0275). This means that the increase in weight associated with height increases by an additional 0.0275 kilogram for every one centimeter increase in girth. It’s important to note though that for donkeys, a 3 gram difference in weight might not be practically significant.

Interpretation of coefficients in regression output can be a bit of a mouthful, and word choice really does matter, especially when facing transformations of variables and multiple variables interacting with one another. Hopefully this example provides enough guidance to guide you through your next hairy regression interpretation. 

Have a quantitative term or concept that mystifies you? Want it explained simply? Suggest a topic for next month →  @sastoudt. You can also see more of Sara’s work at Ecology for the Masses at her profile here.

Can Humans and Wild Ungulates Live Together in a European Landscape?

Guest post by Benjamin Cretois (Image Credit: Wer Mei, CC BY 2.0)

The challenges and opportunities of coexisting with wild ungulates in the human-dominated landscapes of Europe’s Anthropocene (2020) Linnell, Cretois et al., Biological Conservation, https://doi.org/10.1016/j.biocon.2020.108500

The Crux

The “land sparing vs land sharing” debate is not new to wildlife conservation and is more relevant now than ever. Land sparing entails creating areas distinctly for wildlife, commonly referred to as Protected Areas. The science of spared landscape is well developed and its principles were fundamental to early conservation biology. On the other hand, the confinement of wildlife into human-free area is possible on a very limited in a highly anthropogenic landscape like Europe. Hence, the coexistence movement, which requires both wildlife and humans to share their landscape, leading to a wide range of interactions between the too. This is especially true when it comes to charismatic large mammals including large carnivores and ungulates, whose range has large overlaps with ours.

We wanted to summarise the knowledge on wild ungulate distributions and examine wild ungulate-human interactions. Ungulates are quite varied in Europe, and this study included species such as the wild boar, European bison, moose and roe deer.

Read more

The Challenges Facing Community Ecology

Community ecology, as a relatively new discipline, is fraught with challenges. Here, we look at why an hour spent talking about those challenges may make you feel like the PhD student pictured above (Image Credit: Lau Svensson, CC BY 2.0, Image Cropped)

Anyone who has forayed any small distance into academia will probably understand the following quote by Aristotle.

“The more you know, the more you realize you don’t know.”

According to Stewart Lee, participating in further education means embarking on a “quest to enlarge the global storehouse of all human understanding”. This might be true, yet venturing into academia also means that the more answers you learn to challenging scientific questions, the more questions get opened up. It’s the circle of academic life.

Read more

Policy-Relevant Ecology: Thoughts from the 4th Conference of the Norwegian Ecological Society

The city of Tromsø, in which the NØF 2019 Conference took place last week (Image Credit: The Municipality of Tromsø, Image Cropped, CC BY 2.0)

I spent last week up in Tromsø, Norway, for the 4th Conference of the Norwegian Ecological Society. A two-hour flight further north might not seem like a big deal, however if I were a species alone to myself, my northern distribution limit based on temperature would be Trondheim, where I currently reside. It’s just too damn cold for an Australian in the Arctic Circle! Yet Tromso was surprisingly mild last week, coming off the back of a particularly warm winter. And whilst that might sound great, warming temperatures in the Arctic may cause a plethora of negative effects on local wildlife, including starving local reindeer populations and reducing the vital mosquito population.

Read more

Restoring Biodiversity Through Species Interactions

When species like this toucanet are lost, the interactions that they are a part of are lost too. So how can we restore them? (Image Credit: Jairmoreirafotografia, CC BY-SA 4.0, Image Cropped)

Estimating interaction credit for trophic rewilding in tropical forests (2018) Marjakangas, E.-L. et al., Philosophical Transactions of the Royal Society of Biology, 373, https://dx.doi/10.1098/rstb.2017.0435

The Crux

We have reviewed more than enough papers on biodiversity loss to entitle us to skip the whole “losing species is bad” spiel (see here, here and here). But what we haven’t talked about is that when some species are lost, specific interactions that those species participate in disappear from an ecosystem. Those interactions range from the minute to the crucial. One such crucial example is that of seed dispersal, whereby specific plants rely on specific animals to disperse their seeds, thus maximising biodiversity in other parts of the forest and creating a positive feedback loop.

Naturally, conservationists will want to reintroduce animals to propagate some of these reactions. But as is always the case in conservation, maximising return is absolutely essential when you’re faced with limited resources and a lot of ground to cover. Today’s authors wanted to develop a system for maximising the effect of species reintroduction.

Read more

Victory May Not Guarantee Survival in Species Conflicts

Spreading of the Australian yabby has led to decreases in other local species. But what happens when these species meet?
Spreading of the Australian yabby has led to decreases in other local species. But what happens when these species meet? (Image Credit: Daiju Azuma, CC BY-SA 2.5, Image Cropped)
Insight into invasion: Interactions between a critically endangered and invasive cray fish (2018) Lopez et al., Austral Ecology, doi:10.1111/aec.12654

The Crux

When we talk about invasive species, often the first thing that pops into our minds are things like feral cats, wild pigs, vicious newcomers that wipe out species or transform vast areas. But often what we focus on less are species which arrive and simply outcompete the locals.

The yabby (Cherax destructor) is one such invader. An Australian species, it has been introduced to new waterways through the country and is now threatening other species, including the Falls Spiny Crayfish (Euastacus dharawalus) in eastern New South Wales, Australia. The introduction of the yabby has resulted in a decreasing habitat range for the crayfish, but what sort of mechanisms are causing this? This experiment aimed to document interactions between the two species.

Read more