- Introduced by
- Ana V. Diez Roux; Juan Merlo and colleagues
- Year
- 2000
- Type
- Hierarchical regression model for contextual effects on individual health
- Family
- Social epidemiology / multilevel modeling
What does it do?
Multilevel models of neighborhood effects estimate how the places people live shape their health, over and above who those people are.
Because individuals are nested within neighborhoods, their outcomes are not independent: residents of the same area share an environment and tend to resemble one another more than residents drawn at random. Diez Roux's 2000 review argues that multilevel analysis allows group-level and individual-level factors to be examined together and distinguishes the two conceptually, which single-level regression does not do. Merlo and colleagues emphasised measures of health variation, such as the variance partition coefficient, that let a study report how much of the difference between people is associated with where they live, not only whether a neighborhood characteristic matters on average.
The intuition behind the method
Imagine measuring blood pressure for many people across many neighborhoods. Two things could make residents of one neighborhood healthier than another: the neighborhood itself (clean air, walkable streets, fresh food, safety) or the people who happen to live there (richer, younger, better educated). A standard regression that pools everyone treats each person as an independent observation, so it cannot separate these explanations, and it understates uncertainty when people in the same area are correlated. A multilevel model gives each neighborhood its own random intercept, a shared upward or downward shift for everyone in that area. The spread of these shifts measures how much neighborhoods differ after individual characteristics are accounted for. If the spread shrinks towards zero once individual income and education are controlled, the apparent neighborhood difference was mostly composition; if a neighborhood variable such as deprivation still predicts health after that, it carries a contextual association.
History
Diez Roux's 2000 review in the Annual Review of Public Health set out the rationale for multilevel analysis in public health research, summarised the statistical methodology, and discussed its advantages and disadvantages compared with standard methods, including the conceptual distinction between group-level and individual-level variables. Merlo and colleagues' 2005 tutorial in the Journal of Epidemiology and Community Health linked multilevel regression to social epidemiological concepts, focusing on measures of health variation and clustering as ways to operationalise contextual phenomena.
When to use it
Use these models when individuals are nested within geographic or social units and the question is whether those units shape an individual health outcome beyond the individuals' own characteristics. They need enough neighborhoods, with several individuals in each, to estimate between-area variance reliably, together with individual-level covariates to capture composition and at least one genuine area-level variable to test as a contextual effect. The number of clusters and the cluster sizes required depend on the design and the quantity of interest, and should be checked by simulation or sensitivity analysis. Very few or very small clusters make variance estimates unstable. Choose these models when the research question is explicitly about how variation is divided between and within places, or whether an area characteristic matters net of who lives there. If both exposure and outcome are measured only at the area level, the analysis is ecological and the cautions about ecological fallacy apply instead.
Limitations and considerations
- Requires a sufficient number of neighborhoods and adequate within-neighborhood sample sizes to estimate between-area variance reliably.
- Contextual effects are confounded by unmeasured individual composition and by neighborhood self-selection, so observational estimates are not automatically causal.
- Conventional random effects assume neighborhoods are exchangeable and ignore spatial proximity, which spatially structured models address.
- Administrative neighborhood boundaries may not match the spatial scale at which the relevant contextual process actually operates, a modifiable areal unit problem.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Correctly accounts for the clustering of individuals within neighborhoods, avoiding the understated standard errors of single-level regression.
- Separates contextual effects of places from compositional effects of their residents by modeling individual and area variables together.
- Yields interpretable measures of health variation, the variance partition coefficient and median odds ratio, that quantify how much place matters.
- Extends naturally to random slopes and cross-level interactions, capturing how contextual influences modify individual risk factors.
Applications
- Estimating whether neighborhood deprivation or disorder is associated with cardiovascular risk after adjusting for individual socioeconomic status.
- Quantifying the share of variation in obesity, mental health, or mortality that lies between neighborhoods using the variance partition coefficient.
- Reporting the median odds ratio to communicate the magnitude of contextual effects on binary health outcomes to clinicians and policymakers.
- Testing cross-level interactions, such as whether the effect of individual income on health differs by neighborhood affluence, with random slopes.
- Comparing the relative contribution of households, neighborhoods, and regions to a health outcome in three-level hierarchical models.
How it works
How it works
The analysis starts with a two-level model in which an individual outcome depends on individual predictors plus a neighborhood-specific random intercept. The random intercept captures what residents of an area share that the model does not measure directly, and it is assumed to be normally distributed across neighborhoods. This splits the error into a between-neighborhood part and a within-neighborhood part, which single-level regression combines into one term. Diez Roux's review presents multilevel analysis as a way to examine group-level and individual-level factors simultaneously, and this specification is what makes that possible.
Formula
Y_{ij} = \beta_0 + \beta_1 X_{ij} + u_j + \varepsilon_{ij},\quad u_j \sim N(0,\sigma_u^2),\ \varepsilon_{ij} \sim N(0,\sigma_e^2)Once the random intercept is estimated, the model splits total outcome variation into a between-neighborhood component and a within-neighborhood component. The variance partition coefficient is the between-neighborhood share of that variation; in the linear case it equals the intraclass correlation, the correlation between two residents of the same neighborhood. Merlo and colleagues use this clustering measure to ask whether there is clustering within neighborhoods: a clearly non-zero value suggests that place is a relevant level of analysis, while a value near zero suggests that individual factors dominate. The expression above applies to the linear case only. In a logistic model the individual-level residual variance is not estimated in the same way, so a latent-scale residual variance has to be specified. Consult a methods reference for the appropriate logistic formula rather than applying the linear expression directly.
Formula
\mathrm{VPC} = \rho = \dfrac{\sigma_u^2}{\sigma_u^2 + \sigma_e^2}The central task is to distinguish contextual from compositional effects. The model enters individual-level covariates and genuine area-level variables together. The individual covariates adjust for measured differences in neighborhood composition, so an area-level variable that remains associated with the outcome is interpreted as a contextual effect net of that measured composition. Unmeasured or mis-specified composition can still produce an apparent contextual effect. Diez Roux's review discusses the conceptual distinction between group-level and individual-level variables and the difficulty of establishing that effects are independent of one another. A contextual coefficient is therefore only as credible as the individual confounders included, and the residual neighborhood variance should be examined to see how much of it remains once composition is modelled.
Formula
Y_{ij} = \beta_0 + \beta_1 X_{ij}^{\text{ind}} + \gamma\, Z_j^{\text{context}} + u_j + \varepsilon_{ij}For binary outcomes the neighborhood variance is on the log-odds scale and cannot be read directly against the odds ratios of individual risk factors. The median odds ratio converts the between-neighborhood variance of a logistic model into the median increase in odds that a person would face when moving to a higher-risk neighborhood, comparing two randomly chosen areas. Because it is expressed as an odds ratio, it can be placed alongside individual risk-factor odds ratios, so contextual and individual influences are compared on one scale. The formula shown is a standard derived measure of the level-two variance; it is not taken from the Merlo tutorial abstract cited on this page.
Formula
\mathrm{MOR} = \exp\!\bigl(\sqrt{2\,\sigma_u^2}\,\Phi^{-1}(0.75)\bigr) \approx \exp\!\bigl(0.95\,\sigma_u\bigr)The model can be extended so that the effect of an individual predictor varies across neighborhoods by adding a random slope. The random-slope variance tests heterogeneity: whether, for example, the association between income and health is stronger in some neighborhoods than in others. A cross-level interaction is a different term: a fixed-effect product of an area-level variable and an individual predictor. It is needed to ask whether a specific neighborhood characteristic explains that heterogeneity. Merlo and colleagues frame the broader question as whether a contextual phenomenon differs in magnitude for different groups of people and whether neighborhood context modifies individual-level associations. The random-slope specification shown is the standard multilevel form, not one taken from that tutorial.
Formula
Y_{ij} = \beta_0 + (\beta_1 + u_{1j}) X_{ij} + u_{0j} + \varepsilon_{ij},\quad (u_{0j},u_{1j}) \sim N(\mathbf{0},\Sigma)Common pitfalls
- Interpreting a non-zero neighborhood variance as a contextual effect without first adjusting for individual composition that could explain it.
- Reading the variance of a logistic model on the variance scale and comparing it directly to odds ratios, instead of converting to a median odds ratio.
- Fitting a multilevel model to a handful of clusters and trusting the between-area variance estimate despite its instability.
- Choosing administrative units as neighborhoods by convenience and ignoring whether they capture the geographic scale of the hypothesized mechanism.
Frequently asked questions
What is the difference between a contextual and a compositional effect?
A compositional effect arises because a neighborhood's residents differ in their individual characteristics, for example being poorer or older, which can affect their health regardless of place. A contextual effect is a feature of the place itself, such as deprivation, pollution, or lack of services, that affects residents over and above their personal attributes. A multilevel model separates them by entering individual covariates to absorb composition and area-level variables to capture context; a contextual coefficient is only credible once the relevant individual confounders are controlled. The distinction between group-level and individual-level variables, and the difficulty of establishing independent effects, are central themes in Diez Roux's review.
What does the variance partition coefficient tell me?
The variance partition coefficient is the proportion of total outcome variation that lies between neighborhoods rather than within them. In a linear model it equals the intraclass correlation and is the expected correlation in the outcome between two residents of the same neighborhood. Merlo and colleagues use it to ask whether there is clustering within neighborhoods: a sizeable value means neighborhoods differ enough that place is worth studying as a level of analysis, while a value near zero indicates that individual-level variation dominates and contextual modelling will add little.
Why use the median odds ratio instead of just the variance?
For binary outcomes fitted with logistic regression, the neighborhood random-effect variance is on the log-odds scale and is not directly comparable to the odds ratios reported for individual risk factors. The median odds ratio converts that variance into the median increase in the odds of the outcome a person would face if they moved from a lower- to a higher-risk neighborhood, comparing two randomly selected areas. Because it is expressed as an odds ratio, it lets readers weigh the importance of place against familiar individual risk factors on the same scale.
Related methods
Sources
Diez Roux, A. V. (2000). Multilevel Analysis in Public Health Research. Annual Review of Public Health, 21, 171-192.
Open DOI referenceMerlo, J., Yang, M., Chaix, B., Lynch, J., & Rastam, L. (2005). A brief conceptual tutorial on multilevel analysis in social epidemiology: investigating contextual phenomena in different groups of people. Journal of Epidemiology and Community Health, 59(9), 729-736.
Open DOI reference