I wanted to explore if the change in speed between day and night is similar among a set of individuals. To me, the logic way of testing this hypothesis is running a random intercept model and a random slopes model, and see which one has a lower AIC for instance. However, the response variable (speed) is not normally distributed.
I tried a log transformation, and the variable became more similar to a Gaussian distribution, so I run these two models:
ri=lmer(logspeed ~ daytime + sex +
total_length +(1|tag_id),
allspeed_daytime)
ris=lmer(logspeed ~ daytime + sex +
total_length + (daytime|tag_id),
allspeed_daytime)
where "ri" represents a random intercept model, and "ris" a random slopes model.
Before checking which one is better, I wanted to plot the change of my response, logspeed, over daytime (the categorial variable with two values: "day" and "night") as predicted from the models. As expected, the random intercept model results in parallel lines for the different individuals, and the random slopes model allows more flexibility and fits different slopes for the different individuals:
But of course I´m not interested in logspeed, but rather on the original scale, to understand if the rate of change in speed is the same among individuals or not. The "problem" is that if I back transform "logspeed" by taking exponential, and do the plot on the "speed" scale, the random intercept model results in a plot with different slopes actually, where individuals differ in their intercept, but also in their rate of change between day and night.
My second attempt was to not transform speed, and use a Gamma family distribution. However, if I use the "link=log" I get similar results to the ones above, as expected, because the underlying transformation is also a logarithm.
I´m completely aware about why I get the plots I get, but my question is, **how can I test then if individuals vary in their rate of change in speed between day and night **?


