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

Cátia Ferreira De Oliveira cm|o500 @end|ng |rom york@@c@uk
Thu Feb 10 19:36:18 CET 2022


Dear Dr. João Veríssimo,

Why did you remove the random slope for prob in your example? When that's
the learning effect I'm interest in?
rt ~ 1 + session + prob:session + (1 + session + prob:session | subj)

Best wishes,

Cátia

A quarta, 9/02/2022, 20:28, <jl.verissimo using gmail.com> escreveu:

> 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
>
>
>

	[[alternative HTML version deleted]]



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