Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › What Shared Random Effects Do and Do Not Model

The Basic Joint Model · Tutorial 166 of 697

What Shared Random Effects Do and Do Not Model

Learn what dependence shared random effects represent, how to distinguish it from dependence that remains after conditioning on them, and how to check the assumptions with concrete examples.

Advanced 11 min read

What You'll Learn

  • Read the conditional-dependence diagram for a shared-random-effects model
  • Distinguish conditional independence from marginal association
  • Derive marker–event covariance under an explicit conditional-mean assumption
  • Identify residual dependence that shared random effects do not capture
  • Compare shared-effects models with models that represent additional dependence
  • Check conditional-independence assumptions and recognize their limitations

What “Shared” Means in a Joint Model

A longitudinal marker and an event time can be associated even when their observation errors and event process are independent after conditioning on a subject’s latent characteristics. Shared-random-effects models represent one particular source of that association: the same subject-specific random effects help determine both the marker trajectory and the event process. The distinction between dependence through those effects and dependence that remains after conditioning on them is central to understanding what the model does—and does not—assume.

Let \(Y_{ij}\) denote the marker measured for subject \(i\) at time \(t_{ij}\), and let \(b_i\) be that subject’s random-effects vector. A longitudinal submodel can be written \(Y_{ij}=m_i(t_{ij};b_i)+\epsilon_{ij}\), where \(m_i(t;b_i)\) is the latent marker trajectory and \(\epsilon_{ij}\) is measurement error. Let \(T_i^*\) be the event time that would be observed in the absence of censoring. The event submodel specifies the distribution of \(T_i^*\) conditional on the random effects and observed covariates.

Definition: In a shared-random-effects model, the longitudinal and event processes both depend on the same latent subject-specific random effects \(b_i\). The basic conditional-independence assumption is that the longitudinal observations and the event process are independent given \(b_i\) and the modeled covariates. The model therefore allows marginal association through \(b_i\), but assumes no remaining association between those processes once \(b_i\) and the covariates are fixed.

A compact conditional-dependence diagram is: \(b_i \rightarrow Y_i\) and \(b_i \rightarrow T_i^*\), with no additional link between \(Y_i\) and \(T_i^*\) after conditioning on \(b_i\) and covariates. Here \(Y_i\) denotes the subject’s vector of marker observations. In probability notation, the assumption is \(Y_i \perp T_i^* \mid b_i, X_i\), where \(X_i\) collects the modeled covariates. This diagram is a statement about the assumed conditional distribution, not a claim that the random effects are observed or that all possible causes of association have been measured.

Conditional Independence Does Not Mean Marginal Independence

Once \(b_i\) is integrated out, subjects with different latent trajectories can have different event risks. Consequently, marker observations and event outcomes can be associated in the population even though they are conditionally independent given \(b_i\). In general, integrating a common latent variable out of a product of conditional distributions does not produce a product of marginal distributions:

$$ p(Y_i,T_i^*)=\int p(Y_i\mid b_i)\,p(T_i^*\mid b_i)\,p(b_i)\,db_i \quad\text{is not generally equal to}\quad p(Y_i)\,p(T_i^*). $$

The dependence comes from the fact that the same \(b_i\) influences both processes. For example, if a random intercept makes a subject’s marker persistently higher and the event model assigns higher risk to subjects with higher latent marker values, then subjects with higher marker values will tend to have different event outcomes in the marginal population. The direction and size of that association depend on both submodels and the distribution of \(b_i\); sharing effects alone does not determine them.

Worked Example: Marginal Association From a Shared Effect

Consider a hypothetical study at a fixed follow-up time. Let \(b_i\) equal \(1\) or \(-1\), each with probability \(0.5\). Suppose a marker measurement is \(Y_i=b_i+\epsilon_i\), with \(E(\epsilon_i\mid b_i)=0\). Let \(D_i=1\) indicate an event by follow-up, and suppose \(P(D_i=1\mid b_i=1)=0.6\) and \(P(D_i=1\mid b_i=-1)=0.2\). Assume \(\epsilon_i\) and \(D_i\) are conditionally independent given \(b_i\).

First, \(E(Y_i\mid b_i)=b_i\), and \(E(D_i\mid b_i)=q(b_i)\), where \(q(1)=0.6\) and \(q(-1)=0.2\). Conditional independence gives \(\operatorname{Cov}(Y_i,D_i\mid b_i)=0\). The law of total covariance therefore gives

$$ \operatorname{Cov}(Y_i,D_i) =E\{\operatorname{Cov}(Y_i,D_i\mid b_i)\} +\operatorname{Cov}\{E(Y_i\mid b_i),E(D_i\mid b_i)\} =\operatorname{Cov}\{b_i,q(b_i)\}. $$

Now \(E(Y_i)=0\), \(E(D_i)=0.5(0.6)+0.5(0.2)=0.4\), and

$$ E(Y_iD_i)=0.5(1)(0.6)+0.5(-1)(0.2)=0.2. $$

Thus \(\operatorname{Cov}(Y_i,D_i)=0.2-(0)(0.4)=0.2\), in marker units because \(D_i\) is an indicator. This positive marginal covariance follows from the shared effect and the stated conditional-mean assumption. Conditional independence by itself would not justify replacing \(E(Y_i\mid b_i)\) with \(b_i\); that step depends on \(E(\epsilon_i\mid b_i)=0\).

What Shared Effects Do Not Guarantee

A shared-effects model does not guarantee that the marker and event outcome will be marginally associated in every parameter setting. For instance, the event process may not depend on \(b_i\), or the relevant effects can cancel in a particular marginal summary. Nor does zero covariance by itself prove independence. The model describes a conditional structure; the strength and form of marginal association are consequences of that structure and its parameter values.

Worked Example: A Shared Marker Effect With No Marker–Event Association

Suppose \(b_i\) is equally likely to be \(1\) or \(-1\), and \(Y_i=b_i+\epsilon_i\), where \(\epsilon_i\) is independent of \(b_i\), has mean zero, and is independent of the event indicator \(D_i\). Suppose also that \(D_i\) is independent of \(b_i\), with \(P(D_i=1)=0.3\). The marker varies with \(b_i\), but the event process does not use that shared effect.

Assume in addition that \(D_i\) is independent of the pair \((b_i,\epsilon_i)\); then it is independent of \(Y_i=b_i+\epsilon_i\). In particular, \(E(Y_i)=0\), \(E(D_i)=0.3\), and \(E(Y_iD_i)=E(Y_i)E(D_i)=0\), so \(\operatorname{Cov}(Y_i,D_i)=0\). Here the absence of association follows from the stronger independence assumptions, not merely from the covariance calculation. This example shows why “the model has shared random effects” is not enough: the event submodel must actually depend on those effects for them to transmit association.

There is another important limitation: conditional independence given \(b_i\) is an assumption, not an automatic consequence of writing two submodels. A common shock, an unmodeled subject-level factor, or an informative observation process can affect both marker measurements and event risk after \(b_i\) is held fixed. Such dependence is not represented just by including the same random effects in the two submodels.

Worked Example: Dependence Remaining After Conditioning on the Shared Effect

Consider a hypothetical setting in which \(b_i\) is fixed for the calculation, and an additional unmodeled variable \(U_i\) is equally likely to be \(1\) or \(-1\). Let \(Y_i=m_i(b_i)+U_i\), so \(E(Y_i\mid b_i)=m_i(b_i)\). Let \(D_i\) indicate an event by a fixed follow-up time, with \(P(D_i=1\mid U_i=1,b_i)=0.8\) and \(P(D_i=1\mid U_i=-1,b_i)=0.2\). Assume \(Y_i\) and \(D_i\) are conditionally independent given both \(U_i\) and \(b_i\).

Given \(b_i\), \(E(U_i\mid b_i)=0\) and \(P(D_i=1\mid b_i)=0.5(0.8)+0.5(0.2)=0.5\). Also, \(E\{U_iD_i\mid b_i\}=0.5(1)(0.8)+0.5(-1)(0.2)=0.3\). Therefore,

$$ \operatorname{Cov}(Y_i,D_i\mid b_i) =\operatorname{Cov}(U_i,D_i\mid b_i) =0.3-(0)(0.5)=0.3. $$

So \(Y_i\) and \(D_i\) remain dependent after conditioning on \(b_i\). A model that conditions only on \(b_i\) and asserts conditional independence misses this dependence, even though the error has mean zero given \(b_i\). In this example, adding \(U_i\) to the conditioning set removes the dependence by construction; in an analysis, an appropriate extension would need to represent the relevant additional source of dependence rather than assume it away.

Assumptions, Checks, and Alternatives

The basic structure is most credible when the random effects adequately represent the persistent subject-level features linking marker trajectory and event risk, and when no important process-level dependence remains after conditioning on those effects and modeled covariates. For right-censored event times, the censoring mechanism also needs appropriate treatment: a common assumption is that censoring is independent of the event time conditional on the modeled information, or else censoring is modeled. A conditional-independence assumption about the marker and event processes does not by itself justify ignoring informative censoring.

The assumption is difficult to test directly because \(b_i\) is latent. Useful checks include comparing observed marker and event patterns with model-based predictions, examining whether event risk is systematically mispredicted for subjects with particular marker histories, checking residual patterns over time, and investigating whether visit timing or dropout depends on observed history. These checks can reveal incompatibility, but a good fit does not prove that conditional independence is true. Sensitivity analyses are valuable when plausible unmeasured factors could influence both processes.

The main alternatives depend on the source of dependence. A model may include additional shared latent effects, allow correlated random effects with a richer structure, or represent dependence through a separate process such as informative measurement times. Each option changes the conditional structure and requires its own assumptions. Simply adding more random effects without a substantive rationale does not guarantee a better model. Conversely, using only a shared-effects model can be inadequate if dependence remains after conditioning on the chosen effects.

Keep the distinction precise: shared random effects model association induced by common latent subject characteristics; they do not automatically model correlated measurement errors, direct residual links between the processes, informative visit timing, or every unmeasured common cause. These are different assumptions and may call for different model components.

Common Mistakes

  • Equating conditional with marginal independence. Conditional independence given \(b_i\) does not generally imply marginal independence after \(b_i\) is integrated out.
  • Assuming shared effects force association. The event process must depend on the shared effects, and even then a particular marginal association can be zero.
  • Using a zero marginal covariance as proof of independence. Covariance captures only one aspect of dependence; zero covariance does not in general imply independence.
  • Dropping measurement error terms without justification. To write \(E(Y_i\mid b_i)=m_i(b_i)\), one needs \(E(\epsilon_i\mid b_i)=0\), not just conditional independence between \(\epsilon_i\) and the event outcome.
  • Treating shared effects as a universal dependence correction. If residual dependence remains after conditioning on \(b_i\), the basic shared-effects structure does not capture it.
Key takeaway: The defining claim is conditional: marker observations and the event process are independent once the shared random effects and modeled covariates are fixed. Marginal association can arise through those effects, but any dependence that remains after conditioning requires a different or extended model.

Check Your Understanding

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

  1. If \(Y_i \perp T_i^* \mid b_i\), does it follow that \(Y_i\) and \(T_i^*\) are marginally independent? Why or why not?
  2. In the first worked example, which assumption permits \(E(Y_i\mid b_i)=b_i\)?
  3. Suppose the event process does not depend on \(b_i\), while \(Y_i\) does. Does the presence of \(b_i\) in the marker model alone ensure marker–event association?
  4. In the example with \(U_i\), what is the conditional covariance of \(Y_i\) and \(D_i\) given \(b_i\), and what does it show?
  5. Name one kind of dependence that is not automatically represented by sharing random effects.

Solutions. (1) No. Integrating over a shared latent variable can induce marginal association; the conditional distributions need not remain independent after mixing over \(b_i\). (2) The assumption \(E(\epsilon_i\mid b_i)=0\), since \(Y_i=b_i+\epsilon_i\). (3) No. If the event outcome is independent of \(b_i\) and of the marker error, the marker and event can be independent, as in the second worked example. (4) It is \(0.3\), showing that dependence remains after conditioning on \(b_i\), so the basic conditional-independence assumption is violated. (5) Examples include dependence from correlated measurement errors, informative visit timing, or a common factor omitted from \(b_i\).

Clinical Biostats