Discussion
Loading...

#Tag

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Fabrizio Musacchio
Fabrizio Musacchio
@FabMusacchio@mastodon.social  路  activity timestamp last week

Due to a recent discussion with colleagues on whether and when to use #LinearMixedModels ( #LMM), I wrote a blog post comparing LMM to other approaches using simulated data. I thought, it may also be useful for others working with hierarchical data structures in #neuroscience and beyond.

馃實 https://www.fabriziomusacchio.com/blog/2026-01-31-linear_mixed_models/

#Python #Statistics #DataScience #MixedModels #Statsmodels #ANOVA #ANCOVA #GLMM #regression

2 media
Line plot of simulated neural responses versus stimulus strength for three subjects, with residuals and group comparisons.
Line plot of simulated neural responses versus stimulus strength for three subjects, with residuals and group comparisons.
Line plot of simulated neural responses versus stimulus strength for three subjects, with residuals and group comparisons.
Group specific slope comparison in an LMM friendly regime with many groups and few observations per group. ANCOVA interaction slope estimates scatter widely, while LMM BLUP slopes are pulled toward the population mean.
Group specific slope comparison in an LMM friendly regime with many groups and few observations per group. ANCOVA interaction slope estimates scatter widely, while LMM BLUP slopes are pulled toward the population mean.
Group specific slope comparison in an LMM friendly regime with many groups and few observations per group. ANCOVA interaction slope estimates scatter widely, while LMM BLUP slopes are pulled toward the population mean.
Fabrizio Musacchio

Linear mixed models in practice: When ANCOVA is enough and when you really need random effects

Linear mixed models (LMMs) are a powerful statistical tool for analyzing hierarchical or grouped data, common in neuroscience experiments. This post provides a practical guide on when to use LMMs versus traditional ANCOVA approaches, highlighting the advantages of mixed models in handling dependencies, unbalanced designs, and stabilizing estimates through shrinkage. Through simulated examples, we illustrate the differences in model performance and interpretation, helping you to make informed decisions about your statistical analyses.
  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.2-alpha.7 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct