Skip to content
Prev 20189 / 20628 Next

Reducing two mixed models into one

Hello All,

I'm hoping to clarify my prior post to elicit an informative response
from the experts on the list.

Currently, I'm running two models each using a subset of my data (below).

<Question>: Instead of running two separate models, is it possible to
create one model that captures both these separate models?

Thank you,
Tim M
################
d = read.csv("https://raw.githubusercontent.com/fpqq/w/main/d3.csv")
library(optimx)
library(blme)

# Subset 1:
model_2 = blmer(I(-1/RT) ~ Condition + (Condition|Subject) + (Condition|Item),
data = d, control=lmerControl(optimizer="optimx",optCtrl=list(method="nlminb")),
           subset = item_num == "Even")

# Subset 2:
model_3 = blmer(I(-1/RT) ~ Condition + (Condition|Subject) + (Condition|Item),
data = d, control=lmerControl(optimizer="optimx",optCtrl=list(method="nlminb")),
             subset = item_num == "Odd")