[R-sig-ME] Reducing two mixed models into one

Timothy MacKenzie |@w|@wt @end|ng |rom gm@||@com
Sat Jun 10 19:05:33 CEST 2023


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



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