Skip to content
Back to formatted view

Raw Message

Message-ID: <4174219.a3eTIyvfnI@flyosfixe>
Date: 2020-10-04T07:08:22Z
From: Pierre de Villemereuil
Subject: Converting lme4 model syntax into corresponding regression equation
In-Reply-To: <CACgv6yX3J2TjJRCKoNXFkpuBYF-hp-0GRMWsinnvFuXRvFvUoQ@mail.gmail.com>

Hi,

I've recently seen the "equatiomatic" package being advertised for this:
https://github.com/datalorax/equatiomatic/

It doesn't claim to support lmer(), but the author seems to be working toward it:
https://github.com/datalorax/equatiomatic/pull/104

Hope this helps,
Pierre

Le dimanche 4 octobre 2020, 02:43:41 CEST Simon Harmel a ?crit :
> Hello all,
> 
> I was wondering if there is any way (e.g., from an existing R package or
> function) to obtain the combined regression equation from an R formula used
> to fit an lme4::lmer() model?
> 
> For example, if I used `lmer(math ~ ses*sector + (ses | sch.id), data =
> data)`, then the expected output in R expression would be:
> 
> ex <- expression(math == gamma[00] + gamma[01]*sector + gamma[10]*ses +
> gamma[11]*(sector *ses)+U[0]+U1*ses+e)
> 
> plot(1, main = ex, cex.main = .7)
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>