Tutorials › Generalized Linear Mixed Models (GLMM) › Multiple-Membership Random-Effects Models

Crossed and Nested Random Effects · Tutorial 496 of 698

Multiple-Membership Random-Effects Models

Specify weighted random effects for observations linked to multiple units, and see how membership patterns determine dependence and model interpretation.

Advanced 11 min read

What You'll Learn

  • Define multiple membership and membership weights for observations linked to several units.
  • Write a generalized linear mixed model with weighted random effects.
  • Interpret membership weights and distinguish them from estimated random effects.
  • Derive the covariance induced by shared membership.
  • Recognize design and modeling issues that can undermine a multiple-membership specification.

Why Multiple Membership Requires Its Own Model

An observation may be associated with several units of the same type rather than belonging exclusively to one. For example, a patient’s care may involve several clinicians, or a client’s service may be shared across several caseworkers. Assigning each observation to just one unit discards part of the design; copying the observation once for each unit instead gives it artificial replication. A multiple-membership model represents the several links directly, using weights to specify how much each unit contributes.

The weights describe the membership structure; the random effects describe unit-specific departures from the population pattern. Keeping those roles separate is essential. A weight is not a fitted effect, and a random effect does not determine how strongly an observation is linked to its unit.

Definition: In a multiple-membership structure, observation \(i\) is linked to a set of higher-level units \(j\), with known membership weights \(w_{ij}\). Its multiple-membership random effect is the weighted sum \(b_i=\sum_j w_{ij}u_j\), where \(u_j\) is the random effect for unit \(j\). Often the weights are nonnegative and sum to one for each observation, so they can be interpreted as shares of membership.

Model and Assumptions

For a single multiple-membership factor, a generalized linear mixed model can be written as

$$ g\{E(Y_i\mid \mathbf{u})\} = \eta_i = \mathbf{x}_i^\mathsf{T}\boldsymbol{\beta} + \sum_j w_{ij}u_j, \qquad u_j\overset{\mathrm{iid}}{\sim}N(0,\sigma_u^2). $$

Here \(Y_i\) is the response for observation \(i\), \(g\) is the specified link function, \(\mathbf{x}_i\) is its vector of fixed-effect predictors, and \(\boldsymbol{\beta}\) is the corresponding coefficient vector. The vector \(\mathbf{u}\) contains the random effects for the higher-level units. Conditional on those effects, responses are assumed independent and to follow the chosen response distribution, with conditional mean related to the predictors through \(g\). For example, a binary response can use a Bernoulli distribution and logit link.

The specification relies on substantive and statistical assumptions. The recorded memberships and weights must represent the intended links; weights should be established independently of the observed response, unless the model explicitly accounts for their outcome dependence. The normal random-effects assumption says that unit deviations are drawn from a common mean-zero distribution with variance \(\sigma_u^2\), independently across units. Conditional independence means that, after accounting for the fixed predictors and all included random effects, there is no remaining dependence that the model is meant to represent. The response family and link must also be appropriate.

Weights that sum to one have a useful interpretation: the random contribution is an average of the linked unit effects. This is a common convention, not a mathematical requirement. If weights do not sum to one, their scale changes the scale and meaning of the combined random effect; the model must therefore use the actual, justified weights rather than silently rescaling them. If the design has several distinct multiple-membership factors, each can contribute its own weighted random-effect term, provided its structure and assumptions are specified.

Worked Example: A Patient Shared by Two Clinicians

Suppose a hypothetical binary outcome indicates whether a patient experiences a specified event. The patient receives care from clinicians A and B, with prespecified weights 0.6 and 0.4. Consider a logistic model with fixed-effects contribution \(\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}=0.20\), and illustrative clinician effects \(u_A=-0.50\) and \(u_B=0.30\). These values are hypothetical model inputs, not estimates from a real study.

The weights are nonnegative and sum to one, and both clinicians are represented. The patient’s combined clinician effect is

$$ b_i=0.6(-0.50)+0.4(0.30)=-0.30+0.12=-0.18. $$

The linear predictor is \(\eta_i=0.20-0.18=0.02\). Under the logit link, the conditional event probability is

$$ P(Y_i=1\mid \mathbf{u}) = \frac{\exp(0.02)}{1+\exp(0.02)} \approx 0.5050. $$

Thus, given the stated fixed contribution and the two illustrative random effects, the model gives a conditional event probability of about 0.505. It is not a probability averaged over the random-effects distribution. That marginal probability is a different quantity, particularly for a nonlinear link.

How Shared Membership Creates Dependence

Two observations can be associated even when their responses are conditionally independent, because their linear predictors may contain some of the same random effects. Define the multiple-membership contributions \(b_i=\sum_j w_{ij}u_j\) and \(b_k=\sum_j w_{kj}u_j\). Independence and mean zero of the unit effects imply

$$ \operatorname{Cov}(b_i,b_k) = \operatorname{Cov}\left(\sum_j w_{ij}u_j,\sum_\ell w_{k\ell}u_\ell\right) = \sigma_u^2\sum_j w_{ij}w_{kj}. $$

Only units appearing in both observations’ memberships contribute to this covariance. A shared unit with larger weights contributes more; if no unit is shared, this covariance is zero under the stated independent random-effects model. This result concerns the random contribution to the linear predictor. For a non-Gaussian response or nonlinear link, it is not generally equal to the covariance of the observed responses.

The formula follows directly by expanding the covariance. Since \(\operatorname{Cov}(u_j,u_\ell)=0\) for \(j\ne\ell\) and equals \(\sigma_u^2\) for \(j=\ell\), the double sum contains only matching-unit terms. In matrix notation, if \(W\) is the matrix with entries \(w_{ij}\), then the random-effect contribution has covariance matrix \(\sigma_u^2WW^\mathsf{T}\). This expresses how the recorded membership pattern determines dependence before the response family and link are applied.

Worked Example: Covariance From Overlapping Weights

Consider three hypothetical clinicians with independent random effects, each having variance \(\sigma_u^2=0.64\). Observation 1 has weights \((0.50,0.50,0)\), and observation 2 has weights \((0,0.25,0.75)\). The only shared clinician is the second one, and the product of the two weights for that clinician is \(0.50(0.25)=0.125\). Therefore,

$$ \operatorname{Cov}(b_1,b_2) = 0.64\{0.50(0)+0.50(0.25)+0(0.75)\} = 0.64(0.125) = 0.0800. $$

The random contributions to these two linear predictors have covariance 0.0800 on the linear-predictor scale. If the second observation had no membership in the shared clinician, the covariance would be zero under this model. For a binary response with a logit link, 0.0800 is not itself the covariance between the two binary outcomes.

Weights, Interpretation, and Design Choices

A weight should encode a defensible feature of the design, such as an agreed share of responsibility or a prespecified proportion of service time. Equal weights are appropriate only when equal contributions are justified. For example, weights \((0.5,0.5)\) say the two linked units contribute equally to the linear predictor; they do not say that the two unit effects are equal.

An observation with weights \((1,0)\) is effectively assigned to one unit for this random-effect term. An observation with weights \((0.7,0.3)\) draws more of its random contribution from the first unit but remains linked to both. When weights are normalized to sum to one, adding more memberships does not automatically increase their total contribution: the individual shares change instead. When weights are not normalized, the sum of the weights affects the scale of the random contribution and must be interpreted accordingly.

A multiple-membership term differs from a standard crossed-effects specification in which an observation belongs to one level of each of several distinct factors. Here, multiple links occur within a single membership classification. These structures can coexist, but they answer different design questions and should not be conflated. The earlier material on crossed and nested random effects provides the relevant distinctions among unit structures; the multiple-membership specification adds weighted links within one such structure.

Worked Example: Weighted Membership in a Gaussian Model

Suppose a hypothetical continuous outcome is modeled with an identity link. One observation is linked to three service providers with weights \((0.50,0.30,0.20)\). Let its fixed-effects contribution be 10.0 outcome units, and let the illustrative provider effects be \(0.40\), \(-0.20\), and \(0.10\) outcome units. The weights are nonnegative and sum to one, so the weighted contribution is on the same outcome scale as the provider effects.

The multiple-membership contribution is

$$ b_i=0.50(0.40)+0.30(-0.20)+0.20(0.10) =0.20-0.06+0.02 =0.16. $$

The conditional mean is therefore \(10.0+0.16=10.16\) outcome units. The model uses all three providers, rather than assigning the observation only to the provider with the largest weight. This is a conditional mean given the stated effects; it is not a claim that the observed response must equal 10.16.

Specification Checks and Common Failure Modes

Before interpreting fitted results, check that the membership representation matches the process that generated the data. In particular, verify the units, weights, and their sums; determine whether missing or uncertain links have been handled; and check that the weights were not constructed using the outcome in a way that creates unmodeled selection. A design with very little overlap, or with memberships that cannot distinguish unit effects from other predictors, may provide weak information about \(\sigma_u^2\). The number of observations alone does not guarantee that the multiple-membership variance is well identified.

After fitting, examine whether the chosen response distribution and link are plausible, whether unexplained residual patterns remain, and whether the estimated variance is near a boundary such as zero. Compare the conclusions under substantively reasonable alternative weight definitions when those definitions are uncertain. A model can be computed even when its weights encode a poor approximation; numerical convergence does not validate the membership design.

  • Assigning only the largest-weight unit: This changes the model by discarding other specified links. Use the weighted sum when the design says multiple units contribute.
  • Duplicating a response across memberships: This treats one response as if it were several independent observations and can distort both uncertainty and contribution. Keep one response record and represent the links through the weights.
  • Treating weights as random effects: Weights are known design inputs in this specification; \(u_j\) are the modeled random deviations. Estimate or model uncertain weights only with an explicit extension.
  • Reading latent covariance as response covariance: The covariance formula applies to the linear-predictor contributions. For a nonlinear link or non-Gaussian response, response-scale dependence requires additional calculation.

The principal alternative is a single-membership model, suitable when each observation truly belongs to one unit, or a crossed-effects model, suitable when it belongs to one level of each of several distinct factors. Choosing among them is a design decision, not a cosmetic change in notation. Multiple membership is limited by the quality of the recorded weights, the plausibility of the common random-effects distribution, and the amount of overlap available to distinguish the modeled variation.

Key takeaway: A multiple-membership model keeps one response per observation and represents its links through known weights. Those weights combine unit random effects in the linear predictor, while shared weighted memberships induce covariance according to \(\sigma_u^2\sum_j w_{ij}w_{kj}\).

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. An observation has weights 0.25 and 0.75 for two units with effects 0.40 and \(-0.20\). What is its combined random effect?
  2. Two observations share one unit with weights 0.60 and 0.20. If \(\sigma_u^2=0.50\) and they share no other units, what is the covariance between their random contributions?
  3. Why is copying one binary response into two records, one for each of two linked clinicians, generally not a valid substitute for a multiple-membership model?
  4. In a logit-link model, what does the covariance formula for the weighted random effects describe, and what does it not directly give?

Solutions. (1) \(0.25(0.40)+0.75(-0.20)=0.10-0.15=-0.0500\). (2) The covariance is \(0.50\{0.60(0.20)\}=0.0600\). (3) The response is one observation, not two independent responses; duplication creates artificial replication and misrepresents uncertainty. The links should instead be represented by weights in the random-effect contribution. (4) It describes covariance between the observations’ weighted random contributions on the linear-predictor scale. It does not directly give the covariance between their binary responses under the nonlinear logit link.

Clinical Biostats