# linear mixed model with repeated measures

I am trying to wrap my head around linear mixed models for repeated measures with random effects. I'm choosing to conduct this type of model due to missing values in my dataset.

I am interested in analyzing how differing amounts of antibiotics affect the growth of caterpillars. Approximately 24 larvae were organized into 5 treatment groups, with the treatment groups consisting of either 0, 3, or 4 different antibiotic combinations. Larvae were then measured at three varying instar time points--again, some values are missing either at random, or because the larvae did not survive to a given time point.

I am using the lmer package in R to conduct this analysis and would appreciate any help in regards to my model. So far I am using long-format data, that is organized in the following way:

| larvae | treatment | antibiotic amount | instar | weight |


And right now, my model looks like this:

mod <-lmer(weight ~ instar + treatment + (1|larvae), data=data_long)


With larvae being my random effect, instar and treatment as my predictor variables, and the weight as the dependent variable. Again, each larvae in theory is measured (their weight) up to 3 time points (the instar column).

Is this the right model to be using to assess growth rates between individuals and within treatment groups?

• What is the question? Commented Dec 14, 2022 at 0:04
• Sorry--edited. Is this the right model to be using to assess growth rates between individuals and within treatment groups? Commented Dec 14, 2022 at 0:40

The reason for using a linear mixed model is to account for the correlations in the repeated measurements of weight within each larvae. The model now says that weight changes linearly with instar time and that different treatment groups act additively. Assuming that treatment is a factor, the model says that you have five parallel lines for the weight over time, one for each treatment. In the random-effects part, you have included random intercepts. This says that correlations between the different weight measurements for each larva are the same. That is, the correlation between measurements 1 and 2, is the same as the correlation between 1 and 3, and the correlation between 2 and 3.