# Intercepts of repeated measures

I'm examining how boldness of individuals change with time. My data consists of individuals repeatedly measured across trials for boldness scores. First, I plotted each individual to see its mean and variance from the following plot: The x axis depicts individuals and y axis depicts boldness scores. As we can see, individuals differ from each other in their mean scores as well as variance.

Next, I constructed a random slope random intercept plot, to see how boldness vary with time (trials). As lmer resulted in singular fitted model, I used the stan_lmer function from the rstanarm package in R (using the code stan_lmer(Boldness~Trial+(Trial|individualID,data=mydata)). From the model diagnostics, it appeared the model fit was reasonably well. Below is the random intercept random slope plot: Here, each line represents an individual. From the plot, there appears to be very less variation between individuals in the intercept. Similarly, individual slopes are similar indicating similar variation in boldness across time (trials).

However, the boxplot of the raw data showed significant differences between individuals in their means and variances. These differences are very little in the random intercept random slope plot. I'm trying to figure why this is so? Individuals with greater mean values for boldness should have greater intercepts in the random slope plots. Similarly, individual showing greater variance in boldness should show greater variation in slopes. Is my model correct?

Any help is much appreciated. Thanks.

• I'd suggest starting the $y$-axis at about 250 and letting it go to 300, so you can see the spread of the lines better. Also, you don't blot any confidence bands so how can you say anything about variance in the second graph? I think you probably is mostly due to graph scaling. – StatsStudent Dec 21 '18 at 4:31
• I don't really see a problem with the graph except that the y range is just wrong (negative values). If you limit the graph as suggest by the user above you should see better what is going on. – user2974951 Dec 21 '18 at 8:59
• Thanks @StatsStudent. Correct me if I'm wrong, but doesn't slopes of lines say something about the variance? That is, I would except individuals with greater variation in the box plots to show greater magnitude in slopes. But this is not happening, which causes some concern. Thanks. – BP86 Dec 21 '18 at 15:30

This is a simple random intercepts and random slopes model. The fact that the model did not converge with lmer() may indicate that something went wrong in the way the data were fed into the function. In addition, the scale of the plot of the predicted values of boldness is different than the scale of the figure with the box-plots, i.e., in the box-plots some subjects have means below 200, whereas in the lines plot all of the seem to be above 250.