Mixed model for time trend in R package lme4


New Member

I would very much appreciate if anyone could help with my model in lme4.

I have a dataset with 100 persons, specified by ID. Each of them was assessed at three time points, indicated by Time, for a specific measurement, called Score. I want to look at each person's trajectory over time on that score, and see if there is an overall time trend (i.e. if scores over time increase/decrease/remain stable). I have to account for the fact that each person has 3 measurements by a random effect. For this, I've made the following model:


Also, I would like to assess the influence of 1 covariate on this time trend with the following model:


Also, I have calculated confidence intervals around the main effects with this code:


Could anyone please give their thoughts on if this is the most appropriate model and if it actually does what I described above?

Thanks a lot!!