Hi C?tia,
This depends on the contrasts of session AND prob.
With treatment contrasts for session and session 2 as the reference level
(for example), you'd get the 1vs.2 and 2vs.3 comparisons, and you could
simply do the same kinds of sums that you already did to get all three
effects.
Alternatively,
rt ~ 1 + session + prob:session + (1 + session + prob:session | subj)
would give you the prob effect in each of the three sessions, as well as
by-participant random adjustments on those. Perhaps this is a more direct
way of getting what you're after.
To bring group in.... not sure. Maybe:
1 + group * (session + prob:session)
Jo?o
On Wed, 2022-02-09 at 19:31 +0000, C?tia Ferreira De Oliveira via
R-sig-mixed-models wrote:
Hello,
I am interested in modeling a learning effect per session and per
participant and then extracting the random effects per participant so I can
use them for correlations. How can I do that?
If I have one contrast between 2 sessions (1 vs 2) I would do:
model_all = lmer(rt ~ group * prob * session + (1+prob*session|subj),
data=session, REML=FALSE)
df_all = data.frame(coef(model_all$subj))
df$session_1 = df$prob
df$session_2 = df$prob + df$session + df[, "prob:session"] # add up the
main-effects and the interaction to get the other session
But how can I extend this if I have 3 sessions and I want to contrast them
sequentially - 1 vs 2 and then 2 vs 3?
Thank you,
Catia