I have a question on how to extract slopes of single subjects from a moxed model using lmer (see title). So, I have 2 groups, control and treatment (0 and 1), and I am modelling their performance (p) over time. I expected the 1- group to get better faster. Now, if I plot the data and if I set up the model I find that there is actually no significant difference over time between the groups. This is the model I set up:
Performance ~ group * time + age + gender + (time | subject)
Now, in a second step, I would like to extract the slopes of the single subjects and see if there is a correlation between performance slope and another variable X.
If I use
coef(model)$subject I get a table that has these headers: Intercept, time, group1, gender1, age, time:group1
As I am interested in the slope, the "time" column is interesting for me. That should be the "learning slope" of the single subjects, right? Now, for the 0-group, I should just be able to look up the slope of the single subjects in the column for "time". But for the 1-group I am not quite sure how to get the real slope. If do the same as for the 0-group and then compare the means of the 2 groups, the means are exactly the same (which cannot be true. Even though the groups do not differ significantly, the slopes can't be exactly the same.)
Now my question: Do I somehow have to use the time*group column in order to gain the slope of the single subjects of group 1?