# Interpreting FE and RE from plots in an lmer

I am currently trying to understand mixed effect models. And I would like to ask for some help understanding these results.

The data that I have is the mass volume of different rats across different days. Each rat has different time points where they took the measurement of that volume. There are 6 rats with volume measurements and 2 groups 3 rats came from Chile and 3 from England.

So the model is:

 m1 <- lmer(lVolume ~ Country*Day + (1|Rat))


I am trying to understand how I can interpret the results from these plots:

***Update ***

I plotted the estimates:

Fixed parameters betas:

coeff <- fixef(m1)[2] :

PassageChile
0.0458
(respectively for England*Day)

Random parameters :

coeff <- sqrt(VarCorr(m1)\$Rat[1])


To see left plot (similarly for the right one just changes the coeff and conf_int):

ggplot(df, aes(x = Set_Rat_1, y = coeff, color = Country)) +
geom_point(show.legend = FALSE, size = 3,
position = position_dodge(0.5)) +
geom_errorbar(aes(x = Set_Rat_1, ymin = Lower_confidence,
ymax = Upper_confidence), width = 0.2,
position = position_dodge(0.5), show.legend = FALSE) +
scale_shape_manual(values = cols) +
labs(x = "Set_Rat_1", y = "FE", title = "Set Rat 1") +
theme_bw()


In addition, I got this but how do interpret these single points in terms of fixed effect, random effect and volume growth?

df.plot = ggpredict(model = m1,
terms = "Day",
type = "fe")

ggplot(data = df.plot,
mapping = aes(x = x,
y = exp(predicted),
ymin = exp(conf.low),
ymax = exp(conf.high))) +
geom_ribbon(fill = "lightblue") +
geom_line(size = 1)

plot_model(
m1,
bpe = "mean",
bpe.style = "dot",
prob.inner = .4,
prob.outer = .8
)


In that sense,
a) I would like to interpret these plots with the model, what this single value in each country is telling me for both the fixed effect and the random effect.
b) Is there a way to check the significance between these 2 points from the fixed effect and the 2 points from the random effect?
c) Also, when I include more rats and plot the predictions from the m1 model, you can kind of notice a clustering in the growth, is there a statistical way to check that or the lmer tells you about this in some of the parameters?

This is partial data that the model uses:

For rat 1 I have volume c(78, 304, 352, 690, 952, 1250) at days c(89, 110, 117, 124, 131, 138) that belong to country Chile.

For rat 2 I have volume c(202, 440, 520, 870, 1380) at days c(75, 89, 96, 103, 110) that belong to country Chile.

For rat 3 I have volume c(186, 370, 620, 850, 1150) at days c(75, 89, 96, 103, 110) that belong to country Chile.

For rat 4 I have volume c(92, 250, 430, 450, 510, 850, 1000, 1200) at days c(47, 61, 75, 82, 89, 97, 103, 110) that belong to country England.

For rat 5 I have volume c(110, 510, 710, 1200) at days c(47, 61, 75, 82) that belong to country England.

For rat 6 I have volume c(115, 380, 480, 540, 560, 850, 1150, 1350) at days c(47, 61, 75, 82, 89, 97, 103, 110) that belong to country England.

• How to interpret the estimates and the p values in the stats table from the lmer model ? This is quite hard.... Feb 26, 2022 at 22:08

When you have an interaction you have to be very careful when interpreting "fixed effect" coefficients even if there aren't random effects. With default coding in R, the (Intercept) is the estimate when all categorical predictors are at their reference levels (here, country of Chile) and continuous predictors are at 0 (here, Day = 0).

The coefficient for England is the difference from Chile only when Day = 0! That doesn't seem to be a situation of much practical interest in your study. There isn't much point to interpreting a plot of that form of your fixed effect for England

The coefficient for Day is the change per day for Rats from Chile. That assumes a linear change in "mass volume" per day. Your plots suggests that isn't a very good assumption for your data.

The England:Day interaction is the extra change per day for Rats from England over those from Chile. Again, the linearity assumption seems hard to support here.

All that the p-values in your table indicate is whether the corresponding coefficient is significantly different from 0. With interactions you typically want instead to examine differences among realistic combinations of conditions. For example: do Rats from Chile have different "mass volumes" than those from England at Day = 100? That requires extra calculations based on the coefficient estimates and their standard errors. I find the emmeans package to be helpful for performing that type of calculation with associated standard errors and p-values.

With a simple (1|Rat) random effect, the random effects are estimates of the variance of the differences of the individual rats from the overall (Intercept) value. Your model imposes a Gaussian distribution on those intercepts and doesn't allow for any further differences in terms of Country or Day (or their interaction) among the Rats. Thus for an individual Rat you would just add the corresponding fixed effects of Country and Day (including the interaction) to that individual's intercept.

You'd have to use other methods to look for clustering among Rats. The clustering might in part be due to predictors that you have omitted from the model, such as sex (if your Rats weren't all the same sex). I'd recommend evaluating such omitted predictors first.

• Thank you very much! So but for example, in the plot with confident intervals, they overlap in both countries, so does that mean that there is no statistical significance of the beta values of each country? And,also regarding the plot of the ¨cluster behaviours¨ is there a way to kind of squeeze the lmer model and determine if there are ¨hidden cluster¨ within the model ? Mar 3, 2022 at 19:22
• @Rachel overlapping confidence intervals only bear rough relationships to "significance" differences. See this page. The England coefficient in the table near the end shows p < 0.001, for a significant difference from Chile when Day = 0. The interaction term, however, suggests that the difference becomes smaller over time. I don't know of a way to "squeeze hidden clusters" out of an lmer model. I wouldn't do that with this model anyway, as the assumption of linear changes with Days is incorrect according to your plots at the bottom.
– EdM
Mar 3, 2022 at 19:50
• Hi agai @EdM, this is taking me time to digest, but I really appreciate your answer. Quick questions: when you mentioned that in the coefficient Day, "Your plots suggests that isn't a very good assumption for your data" Do you mean that the fitting is not doing a correctly job? So then try to assume a different approach? in the sense of maybe not assuming that this growth is linear by taking the log(Vol)(but in really what I plotted what exp(fitted) values, so then assuming that the growth is exponential)? Similarly, with you comment over the linearity in the interaction coefficient ? Thanks Mar 7, 2022 at 11:48
• In your opinion @EdM, do you think that this data would require a non-linear approach? I have been reading some other approaches for growth mass, such as the Gompertz, the power-law or the logistic models. But don't you think that by including more parameters in a more complex model, we would lose biological interpretation like the nice one you described in your main answer? Sorry for the question is just like it is a fascinating topic, and I would like to learn as much as possible from experts like you and others on this website. Sometimes books are more lack interpretation on examples here Mar 7, 2022 at 13:04
• @Rachel if a simple biological model doesn't describe the data adequately, then you gain something with a more complex model. It's hard to know how well your model described your data, as you didn't show things like plots of residuals (differences between observed and fitted values) versus fitted values. Exponential increases in rat volume might hold over some early time periods, but not over the whole lifespan. Males and females can differ. You could use parametric models as you suggest (logistic, etc.), or flexible approaches like restricted cubic splines or generalized additive models.
– EdM
Mar 7, 2022 at 15:18

I suggest doing this, for starters:

library(emmeans)
RG <- ref_grid(m1, at = list(Day = c(0, 50, 100, 150),
options = list(tran = "log"))
emmip(RG, Country ~ Day)


(or whatever Day values are most important.) The plot will show a line for each country, and having tran = "log" in there gives you the flexibility to undo the log transformation later that you apparently applied to the response variable.

One useful way to think about the model you have is that there are two non-parallel lines. You can use something like

emmeans(RG, ~ Country | Day)
pairs(.Last.value)


To view estimates (on the log scale) and comparisons thereof. If you want to see those on the original response scale, add the argument type = "response" to the emmeans() call.

Another thing you can do is compare the slopes of those two lines:

emtrends(m1, ~ Country, var = "Day")
pairs(.Last.value)


I recommend looking at some of the vignettes in the emmeans package, especially in this case the one on interactions.

Finally, I should be remiss not to mention that you should check that the model fits reasonably well. For example,

plot(resid(m1) ~ Day)


If you see any curvature there, it may be appropriate to choose a more complex model that models that.

• Hi @RussLenth, thank you for your answer. This is very interesting, I plotted what you suggested ( ibb.co/TPwpG8G ), and this is the interpretation that I would give but I really would like to know yours: the plot is saying that English mice start with a larger volume but tend to grow at a slightly slower rate than Chilean mice (you can see that by day 180, there is only a very small difference between the two) ? Also in that sense is there a way to check that there is statistical significance of mass growth between these two countries ? Thanks again. Mar 7, 2022 at 12:52
• The two lines of code for emtrends provide those estimates and comparison. But what I am concerned about is that the plot you give could not have resulted from the model m1 that is shown in the question. That model fits two straight lines. It is really difficult to answer people's questions when what they show is different from what they actually did. Mar 7, 2022 at 14:19
• The plot you see is from emmeans(RG, ~ Country | Day) (ibb.co/TPwpG8G) having for each line the marginal distribution of each country, and from the code emtrends (ibb.co/5YV3Qfk). Mar 7, 2022 at 15:02
• Right, but the model m1 that went intoRG is a model for two straight lines. Yet what you show is curves. Mar 7, 2022 at 15:07
• Because I put the Log as you suggested (tran = "log") since I am taking the logVol of the y variable. Mar 7, 2022 at 15:34