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

Thierry Onkelinx th|erry@onke||nx @end|ng |rom |nbo@be
Mon Jun 12 08:35:31 CEST 2023


Dear Timothy,

Add the interaction with item_num to every parameter and you should have
the same parameterization for both models in a single model.

# gives similar parameters as both models
I(-1/RT) ~ item_num + item_num:Condition + (item_num +
item_num:Condition|Subject)
+ (item_num + item_num:Condition|Item)
# same model fit, different parametrization
I(-1/RT) ~ item_num*Condition + (item_num*Condition|Subject) + (item_num*
Condition|Item)

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op za 10 jun 2023 om 19:06 schreef Timothy MacKenzie <fswfswt using gmail.com>:

> 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")
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]



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