Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

🪜 Multilevel Models

Multilevel models, also called linear mixed models (LMMs), are a statistical approach to simultaneously model predictors at different levels of data. These models help account for variability within and between nested groups, such as individuals within clusters or organizations. Multilevel regression is particularly useful for analyzing nested sources of variability, allowing researchers to explore questions about relationships both within and between these levels.

A Practical Example

Imagine we have data from patients in three different hospitals, and we aim to predict “will to live” (YY) based on “symptom severity” (XX). At first glance, the data may suggest a positive relationship between “will to live” and “symptom severity”: the more severe the symptoms, the higher the will to live. This finding might appear counterintuitive.

Screenshot taken from Quant Psych (Youtube)

Figure 1:Screenshot taken from Quant Psych (Youtube)

When we color-code the data points by hospital, however, a different pattern emerges. Within each hospital, the relationship between “will to live” and “symptom severity” is negative - as symptom severity increases, the will to live decreases, which is a more intuitive result.

Screenshot taken from Quant Psych (Youtube)

Figure 2:Screenshot taken from Quant Psych (Youtube)

If we ignore the clustering variable “hospital,” we risk being misled by the data. This is because data points within a single hospital tend to influence one another. For example:

In this scenario, the variable “staff quality” could explain the differences in “will to live” between hospitals. Here, hospitals are level-2 units, and patients are level-1 units. Variables like “staff quality” that explain differences between level-2 units are called level-2 variables.

Even within clusters (hospitals), there is a person-to-person variability. For instance:

This variability within hospitals is at level 1 and could be explained by factors like individual “resilience.” Variables that explain differences between individuals (level-1 units) are referred to as level-1 variables.