[R-sig-ME] Converting lme4 model syntax into corresponding regression equation
Pierre de Villemereuil
p|erre@dev|||emereu|| @end|ng |rom ephe@p@|@eu
Sun Oct 4 09:08:22 CEST 2020
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 using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
More information about the R-sig-mixed-models
mailing list