1
$\begingroup$

I have a roughly exponential relationship between insect counts and distance along a growing tunnels, and need to examine the effects of different tunnel types as they relate to the abundance and distributions of insects along the tunnels, also considering microclimate factors. I have run GLMM models with lme4 and glmmadmb in R (poisson and negative binomial), and this seems okay. However, I wonder if transforming the predictor variable "distance to edge of tunnel (m)" by log10 transformation to create a more linear relationship with the response variable (insect counts) is statistically problematic in the context of GLMMs? I realise this make interpretation of the coefficients more difficult. The other option I see is to use GAMMs, but as I have little experience with them I would prefer not to use them. My count data is also over-dispersed, possibly zero-inflated, and I need to use offsets to account for differences in floral abundance and random effects to account for resampling, which in GAMMs is causing me some problems. An example of the GLMM models and the relationship between distance and insect abundance (image is here is graphed as a ratio per plant but the models use the raw count data ie integers) I am evaluating are:


glmmadmb(Pollinators_count ~ Distance_from_edge * Wind_speed * temperature * Treatment + offset(log(Flower_count)) + (1|ROW) + (1|DATE), data = transects, family ="nbinom")

relationship between animal abundance and distance

$\endgroup$
3
  • $\begingroup$ Thanks Frans, maybe my edit additions above will help. I am modelling the count data (integers) using distance (continuous) as predictor, so I believe Poisson/negative binomial is correct. The only theoretical justification for transformation of distance I can think of is to create a better model. $\endgroup$ Commented Jul 21, 2019 at 4:50
  • $\begingroup$ Thanks again, Frans. I am not really sure why I observed this exponential relationship, and didn't expect it. All I can say is that it related to foraging behaviour of insects given the spatial layout and environmental changes along my transect. So I guess I don't have a strong theoretical argument as to why to transform distance $\endgroup$ Commented Jul 21, 2019 at 5:12
  • $\begingroup$ Are the ants not normally distributed around edge of tunnel? $\endgroup$
    – seanv507
    Commented Jul 21, 2019 at 9:15

1 Answer 1

1
$\begingroup$

First off, I'm assuming by the nature of your variables that the purpose of your model is inference. There is nothing wrong with using transformations as long as you can justify them theoretically.
(For prediction, there is no need to be concerned about theoretical justification of transformations as long as the prediction improves.)

You say there appears to be a more or less exponential relationship... why? A possible way to explain this is that there are diminishing returns of the effect of distance: The difference between small distances may be crucial, but the differences between larger distances may be irrelevant.

For the $\log_{10}$, what you are essentially doing is treating a difference between $1$ m and $2$ m identically to a difference between of $10$ m and $20$ m.

Note that a logarithm of any base will achieve the same change in shape. You are therefore free to use whatever seems easier to interpret / more appropriate:

  • $\log_{2}(\text{distance})$: Doubling the distance affects the linear part of the GLMM by $\hat{\beta}$
  • $\log_{10}(\text{distance})$:Every $10\times$ increase in distance affects the linear part of the GLMM by $\hat{\beta}$
  • $\log_{g}(\text{distance})$: Something else

You could also use $\sqrt{\text{distance}}$ to reduce right-skew with less aggressive diminishing returns.

A possible justification for using the square-root transformation could be that the distance to the tunnel may not be traversable directly and increases the area in between quadratically.

Here is a visualization I made of how these transformations are related:

similar

(Note that the picture is about transforming $y$ and the logarithm shown here is the natural logarithm $\ln$.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.