# \#mixed-models

**URL:** https://discourse.julialang.org/tag/mixed-models/1301.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Programmatically create formula](https://discourse.julialang.org/t/programmatically-create-formula/136170)

<div class="topic-metadata">

**Author:** [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Replies:** 4\
**Last updated:** [March 12, 2026, 7:27pm UTC](https://discourse.julialang.org/t/programmatically-create-formula/136170 "2026-03-12T19:27:52Z")

</div>

Hi, I’m wanting to use this formula programatically: f = @formula(var ~ A \* B + (1 | id)) Here’s what the AI recommends, but it doesn’t seem to work: varname = :y # or Symbol("y") f = @formula($(varname) ~ A \* B + (…

---

## [Incorporating Splines and Offset in MixedModels.jl](https://discourse.julialang.org/t/incorporating-splines-and-offset-in-mixedmodels-jl/136025)

<div class="topic-metadata">

**Author:** [@imantha](https://discourse.julialang.org/u/imantha)\
**Replies:** 3\
**Last updated:** [March 12, 2026, 4:23am UTC](https://discourse.julialang.org/t/incorporating-splines-and-offset-in-mixedmodels-jl/136025 "2026-03-12T04:23:57Z")

</div>

Hi, I am working on project that required doing multilevel models and the dataset is quite large (7 million rows). My current implementation is in R but takes quite a bit of time using glmmTMB package. So, I was wonderi…

---

## [lme4::lmList equivalent in Julia](https://discourse.julialang.org/t/lme4-lmlist-equivalent-in-julia/102670)

<div class="topic-metadata">

**Author:** [@lindemann09](https://discourse.julialang.org/u/lindemann09)\
**Replies:** 2\
**Last updated:** [August 14, 2023, 10:23am UTC](https://discourse.julialang.org/t/lme4-lmlist-equivalent-in-julia/102670 "2023-08-14T10:23:43Z")

</div>

The lme4 package in R has the function lmList, which I use heavily to examine shrinkage in mixed-models. MixedModels.jl does not seem to have the function. MixedModelsMakie.jl is great to visualize shrinkage, but it doe…

---

## [How to specify weights (wts) in MixedModels.jl?](https://discourse.julialang.org/t/how-to-specify-weights-wts-in-mixedmodels-jl/98707)

<div class="topic-metadata">

**Author:** [@Rscho314](https://discourse.julialang.org/u/Rscho314)\
**Replies:** 0\
**Last updated:** [May 11, 2023, 11:22pm UTC](https://discourse.julialang.org/t/how-to-specify-weights-wts-in-mixedmodels-jl/98707 "2023-05-11T23:22:44Z")

</div>

Hi, I specified a multilevel longitudinal model in MixedModels.jl. I am having a heteroscedasticity issue, for which I’d like to try to weight observations. So, the unweighted model: fit(MixedModel,@formula(maxtrop~1+…

---

## [LMM coefficient difference](https://discourse.julialang.org/t/lmm-coefficient-difference/95626)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 0\
**Last updated:** [March 6, 2023, 6:05pm UTC](https://discourse.julialang.org/t/lmm-coefficient-difference/95626 "2023-03-06T18:05:04Z")

</div>

Hello! I try to use MixedModels and GLM for binary data outcome analysis. So I have model: @formula(resp ~ pred1 + pred2) where pred1 and pred2 are continuous predictors. I fit model with Bernoulli() distribution an…
