[R-sig-ME] random effects - multiple sessions

Cátia Ferreira De Oliveira cm|o500 @end|ng |rom york@@c@uk
Wed Feb 9 20:31:56 CET 2022


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

-- 
Cátia Margarida Ferreira de Oliveira
Psychology PhD Student
Department of Psychology, Room A105
University of York, YO10 5DD
Twitter: @CatiaMOliveira
pronouns: she, her

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list