Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Simulation Study for Link Misspecification

Sensitivity to the Association Structure · Tutorial 241 of 697

Simulation Study for Link Misspecification

Learn to compare association links in a controlled simulation and evaluate how misspecification affects estimation, uncertainty, and scientific conclusions.

Advanced 11 min read

What You'll Learn

  • Specify a joint data-generating mechanism with a known biomarker–hazard link.
  • Compare fitted links while holding other modeling choices constant.
  • Calculate simulation bias and Monte Carlo standard errors.
  • Assess confidence-interval coverage and errors in directional conclusions.
  • Diagnose convergence problems and distinguish link sensitivity from other misspecification.
  • Interpret comparisons on a common, scientifically meaningful scale.

Why Simulate Link Misspecification?

A joint model connects a subject’s longitudinal biomarker trajectory to the event hazard through an association structure. In practice, the scientific link is rarely known with certainty. A model using the current latent biomarker value may therefore be fitted when the data-generating association depends on a slope or another feature of the trajectory. A simulation study makes this uncertainty concrete: specify a plausible mechanism, generate many hypothetical data sets from it, fit the competing links, and measure how the choice affects estimates and conclusions.

The purpose is not to identify a universally correct link from simulated data. It is to learn how particular fitted models behave under clearly stated conditions. A useful study separates link misspecification from changes in trajectory modeling, baseline-hazard flexibility, visit schedules, or censoring. If several components change at once, a difference in results cannot be attributed specifically to the link.

Define the Data-Generating Mechanism

For subject \(i\), let \(Y_{ij}\) be the biomarker measurement at visit time \(t_{ij}\), and let \(m_i(t)\) be the subject’s latent biomarker trajectory. Let \(T_i\) be the event time and \(C_i\) the censoring time; the observed time is \(\tilde T_i=\min(T_i,C_i)\), with event indicator \(\delta_i=I(T_i\leq C_i)\). A simple longitudinal model is

$$ Y_{ij}=m_i(t_{ij})+\epsilon_{ij}, \qquad m_i(t)=\beta_0+\beta_1t+b_{0i}+b_{1i}t. $$

Here \(b_i=(b_{0i},b_{1i})^\mathsf{T}\) represents subject-specific random effects, and \(\epsilon_{ij}\) is measurement error. For example, a current-value data-generating hazard could be

$$ \lambda_i(t\mid b_i,x_i) =\lambda_0(t)\exp\{\gamma^\mathsf{T}x_i+\alpha m_i(t)\}. $$

The coefficient \(\alpha\) describes the log-hazard change for a one-unit increase in the latent biomarker, conditional on the covariates and the rest of the model. If the biomarker is standardized, that unit is one standard deviation; otherwise, it is the measurement unit used for \(m_i(t)\). An alternative data-generating mechanism could replace \(m_i(t)\) with \(m_i'(t)\), or with another prespecified trajectory feature. The simulation must state which mechanism is treated as true in each scenario.

Definition: A link-misspecification simulation generates data from a specified association structure, fits one or more models with alternative association structures, and summarizes how those fitted models estimate prespecified targets or reach prespecified conclusions.

A defensible design states the assumptions used to generate data. These may include the random-effects distribution and covariance, the measurement-error distribution, the visit schedule, the baseline hazard, covariate distributions, and the censoring mechanism. For a typical conditional simulation, the event hazard depends on the latent trajectory and specified covariates; the observed biomarker measurements arise from the trajectory plus measurement error; and censoring is independent of the event time conditional on the modeled covariates and other stated conditioning variables. If visits stop at the event, the simulation should impose that rule. If the visit process itself is informative, it must be modeled or studied as an additional source of misspecification.

Generate event and censoring times according to the stated mechanisms, then construct \(\tilde T_i\) and \(\delta_i\). Fit each candidate joint model to the same simulated data set. To isolate link sensitivity, keep the longitudinal structure, covariates, baseline-hazard specification, and estimation settings the same across candidate fits unless a planned scenario deliberately varies one of them.

Choose Targets Before Comparing Models

Simulation summaries are meaningful only when their target is clear. When a fitted link has the same parameter meaning as the generating link, coefficient bias can be summarized directly. When link functions differ, their association coefficients generally have different meanings and units. A current-value coefficient and a slope coefficient should not be compared as if both estimated the same parameter.

For different links, define a common scientific contrast. For instance, choose two prespecified latent trajectories, A and B, and a time \(t^\ast\). The target may be their log-hazard contrast at that time under the generating mechanism. Each fitted model can then be used to predict the same contrast for those trajectories. This puts the comparison on a common scale even when the fitted link coefficients are not directly comparable. The trajectories and time should be selected for scientific relevance, not chosen after inspecting the results.

For a parameter \(\theta\) with known generating value \(\theta_0\), let \(\hat\theta_r\) be the estimate in replicate \(r\), for \(r=1,\ldots,R\). The estimated bias is the average estimation error across replicates. Its Monte Carlo standard error (MCSE) describes the simulation noise in that estimated average, not the standard error within a fitted data set.

$$ \widehat{\operatorname{Bias}}(\hat\theta) =\frac{1}{R}\sum_{r=1}^R\hat\theta_r-\theta_0, \qquad \widehat{\operatorname{MCSE}}\{\widehat{\operatorname{Bias}}\} =\frac{s_{\hat\theta}}{\sqrt R}. $$

Here \(s_{\hat\theta}\) is the sample standard deviation of the replicate estimates. The MCSE decreases as the number of independent replicates increases. It does not measure uncertainty about whether the chosen data-generating mechanism is realistic.

Worked Example: Calculating Bias and Its Monte Carlo Error

Suppose 1,000 hypothetical data sets are generated under a current-value link with true association coefficient \(\alpha=0.60\) per biomarker unit. The correctly specified model has a mean estimated coefficient of \(0.52\) and a replicate standard deviation of \(0.18\).

The estimated bias is

$$ 0.52-0.60=-0.08 $$

The fitted model underestimates the generating coefficient by \(0.08\) per biomarker unit on average in this simulation. The MCSE of that estimated bias is

$$ \frac{0.18}{\sqrt{1000}}=0.00569. $$

Thus the observed bias is substantially larger than the Monte Carlo noise in its estimate. This does not establish that the model will be biased in every application: the result applies to the specified generating conditions, sample size, and fitting procedure.

Measure Uncertainty and Substantive Errors

Bias alone does not describe all consequences of a wrong link. A model can have modest average bias but produce confidence intervals that are too narrow, or it can yield unstable conclusions in a clinically important subset of scenarios. For a nominal 95% confidence interval, empirical coverage is the proportion of simulation replicates in which the interval contains the target value. If \(K\) of \(R\) intervals cover, the estimated coverage is \(\hat p=K/R\), with approximate MCSE \(\sqrt{\hat p(1-\hat p)/R}\), since each replicate contributes a cover-or-not indicator.

A substantive conclusion also needs an explicit rule. For example, a directional rule might declare evidence of a positive association only when a two-sided 95% confidence interval lies entirely above zero. When the generating association is positive, the proportion of replicates declaring a negative association estimates the frequency of a wrong-direction conclusion under that scenario. The proportion declaring no positive association can also be informative, but it is not the same quantity as bias or interval coverage.

For comparisons across different links, calculate the prespecified common contrast in every replicate and evaluate its bias, interval coverage, or decision error. A coefficient from one link may not be a valid target for a coefficient from another. When the target is a contrast, describe the trajectories, time, covariate values, and units that define it.

Worked Example: Checking Coverage for a Common Contrast

Suppose trajectories A and B are chosen so that at time \(t^\ast=2\) years they differ by \(0.8\) standardized biomarker units, and their slopes differ by \(0.15\) standardized units per year. Data are generated from a current-value link with \(\alpha=0.40\) per standardized unit. The true log-hazard contrast at \(t^\ast\) is therefore

$$ 0.40(0.8)=0.32, \qquad \mathrm{HR}=\exp(0.32)=1.377. $$

The hazard ratio of about 1.38 is the generating contrast for these two trajectories at that time, conditional on the other model terms. Suppose the fitted current-value model produces 941 intervals covering the log-hazard contrast \(0.32\) across 1,000 replicates. Its empirical coverage is \(941/1000=0.941\), and its approximate MCSE is

$$ \sqrt{\frac{0.941(1-0.941)}{1000}}=0.00745. $$

The estimated coverage is 94.1%, about 0.9 percentage points below the nominal 95%; this difference should be considered relative to the MCSE and the full simulation design. If a slope-link fit is also assessed, it must predict the same A-versus-B contrast. Its slope coefficient is not directly compared with \(0.40\), because its units and interpretation differ.

Design and Analyze the Simulation

A useful study varies the feature most relevant to its scientific question while avoiding an unmanageable collection of scenarios. Possible factors include sample size, strength of association, random-effects variability, measurement error, number and timing of visits, event rate, and censoring proportion. A baseline scenario can reflect plausible conditions; additional scenarios can stress the design, such as sparse visits or weaker event information. Changing factors systematically helps distinguish a robust pattern from one particular configuration.

1
Specify the generating scenarios.
Write down the longitudinal, event-time, covariate, visit, and censoring mechanisms. Mark which association link is true in each scenario and record the generating parameter values.
2
Prespecify targets and rules.
Choose coefficient targets when their meaning matches across fits; otherwise choose a common contrast. Define interval levels and decision rules before examining simulation results.
3
Generate and fit replicate data sets.
Use the same replicate data for every candidate link in a scenario. This paired design makes model comparisons less noisy because the fits face the same simulated subjects and events.
4
Summarize performance and failures.
Report bias or contrast error, empirical standard errors, interval coverage, decision-error rates, convergence failures, and the number of successful fits, with MCSEs for key summaries.

Using identical data within each replicate is especially valuable: a difference between two model summaries then reflects their differing fits on the same simulated sample, rather than unrelated random samples. Still, a simulation must report convergence and boundary problems. Silently dropping failed fits can make a model appear more reliable than it is, especially if failures occur more often in difficult data sets.

Worked Example: Quantifying a Wrong-Direction Conclusion

In a scenario with a positive generating association, suppose 1,000 fits of a misspecified link lead to the following prespecified classifications: 834 intervals lie entirely above zero, 117 intervals include zero, and 49 intervals lie entirely below zero. These categories sum to \(834+117+49=1000\).

Under the stated rule, the wrong-direction rate is

$$ \frac{49}{1000}=0.049, \qquad \widehat{\operatorname{MCSE}}=\sqrt{\frac{0.049(1-0.049)}{1000}}=0.00683. $$

Thus 4.9% of replicates support a statistically significant negative association even though the generating association is positive. The fraction classified as inconclusive is \(117/1000=0.117\), or 11.7%. These are different outcomes: the first is a wrong-direction declaration, while the second is failure to declare a positive association under this rule. Neither percentage is the probability that a particular conclusion is wrong in a real study.

Diagnostics, Alternatives, and Limitations

Before interpreting link comparisons, check whether the simulation is behaving as intended. Confirm that generated event rates, censoring proportions, visit counts, and biomarker distributions match the design. Check that the fitting procedure recovers parameters reasonably under a correctly specified link; poor performance even in that setting points to an implementation, estimation, or information problem rather than an isolated link issue. Inspect convergence rates, extreme estimates, estimated random-effects covariance matrices, and interval widths by scenario and fitted link. Summaries based only on successful fits should be accompanied by the failure rate and a discussion of how failures could affect conclusions.

The main alternative to a simulation study is a sensitivity analysis on observed data: fit several plausible links and compare their estimates, uncertainty, predictions, or decisions. That analysis shows how the conclusions for the observed sample vary across specifications; it does not reveal which fit would perform best under a known generating process. Simulation supplies that controlled benchmark, but its conclusions are conditional on its assumptions. The two approaches answer different questions and can complement one another.

A common mistake is to fit alternative links, observe different coefficient estimates, and call the difference “bias.” That reasoning is incorrect when the coefficients represent different trajectory features or use different units. The correction is to compare each coefficient only with its matching generating parameter, or to translate each fit into a shared estimand such as a prespecified log-hazard contrast. A second pitfall is treating a small estimated bias as proof of general validity. Small bias in one scenario says nothing by itself about coverage, decision errors, other scenarios, or departures from the chosen data-generating mechanism.

Simulation results are not universal rankings of association structures. They depend on the trajectory distribution, event information, measurement schedule, censoring, sample size, and fitting implementation. They also cannot reproduce every feature of real data. Report the generating assumptions and scenarios transparently so readers can judge which conditions are relevant to their application.

Key takeaway: A simulation of link misspecification is most informative when it isolates the link, uses a prespecified common target where needed, quantifies Monte Carlo error, and reports both inferential performance and substantive decision errors.

Check Your Understanding

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

  1. A fitted current-value coefficient and a fitted slope coefficient differ numerically. Why is their difference not, by itself, evidence of bias?
  2. In 400 simulation replicates, 372 intervals cover the target. Calculate empirical coverage and its approximate MCSE.
  3. Why should candidate links be fitted to the same simulated data set within each replicate?
  4. A model has low average bias but a high rate of convergence failure. Why is bias alone an inadequate summary?

Solutions. (1) The coefficients describe different trajectory features and generally have different units; compare each with its own generating value or evaluate a shared contrast. (2) Coverage is \(372/400=0.930\). Its approximate MCSE is \(\sqrt{0.930(0.070)/400}=0.0128\). (3) Pairing controls variation due to which subjects and events happened to be generated, making differences between fits more directly attributable to the fitted links. (4) Bias among successful fits may conceal instability or selective failures; report convergence and failure rates alongside the other performance measures.

Clinical Biostats