I'm trying to see how personalities of individuals change with time. The variables in my data are: 1. latency to emerge (response variable in continuous scale) measured for 204 individuals from 14 colonies. Each individual was measured for 6 times (6 trials). The 204 individuals came from 14 different colonies, so individuals (ID) are nested within colonies. Individuals have distinct IDs in the data set such that each ID can belong to only one of the 14 colonies (for example: IDs 1-20 in colony 1, 21-40 in colony 2 and so on). In this scenario, there is an excellent link here which shows that the model output will be the same for (1|colony)+(1|ID)
and (1|colony/ID)
.
I would like to see how the latency to emerge of individuals (IDs) change with time/trials. Remember, individuals are not independent, but nested within colonies. Therefore, I made two models:
m1 <- lmer(Latency~Trial+(1|colony)+(Trial|ID),data=mydata) and
m2 <- lmer(Latency~Trial+(Trial|ID),data=mydata).
I know that model m2
assumes that individuals are independent of colonies (while in reality, individuals are non-independent of their respective colonies). Does model m1
account for this lack of independence? How is model 1 different from model 2 in terms of the random slopes plotted against each individual?