Why Simulate Parameter Recovery?
A joint-model fit can converge and still estimate a parameter poorly. When information is weak, estimates may be biased, intervals may miss their target too often, or an optimizer may fail to find a usable solution. A parameter-recovery simulation makes these concerns concrete: specify a model and known parameter values, generate many hypothetical data sets from them, refit the model, and compare the estimates with the values used to generate the data.
The purpose is not to show that a model is correct for an actual study. Rather, it is to assess how an estimator and fitting procedure behave under specified conditions. Recovery depends on the whole setup: the assumed data-generating model, sample size, visit schedule, event rate, censoring, parameter values, and numerical fitting procedure. Good recovery in one scenario does not establish good recovery in every scenario.
Specify the Model Before Simulating
Consider a shared-random-effects joint model with one continuous longitudinal marker and a time-to-event outcome. For subject \(i\), let \(Y_{ij}\) be the marker measured at time \(t_{ij}\), and let \(T_i\) be the event time. One possible model is
The latent marker trajectory is \(m_i(t)=\beta_0+\beta_1t+b_{0i}+b_{1i}t\). In this example, the event hazard conditional on the random effects and a baseline covariate \(X_i\) is
Here \(h_0(t)\) is the baseline hazard, \(\gamma\) is the covariate log-hazard coefficient, and \(\alpha\) is the association parameter linking the latent marker to the hazard. A one-unit increase in \(m_i(t)\) corresponds to a hazard ratio of \(\exp(\alpha)\), conditional on the covariate and the model. This is a conditional model statement, not a causal conclusion.
A simulation should state its assumptions explicitly. In this example, subjects are independent; random effects follow the specified bivariate normal distribution; residual errors are independent normal variables with variance \(\sigma^2\), independent of the random effects; and the conditional event hazard follows the stated model. Visits may be scheduled at fixed times, with marker measurements stopping at the event or censoring time. For a simple design, censoring can be administrative at a fixed study end \(\tau\). The observed time is then \(U_i=\min(T_i,\tau)\), with event indicator \(\delta_i=I(T_i\leq\tau)\). If censoring is random instead, its generation and assumptions should also be specified.
The fitted model should match the data-generating model when the aim is to assess recovery under correct specification. If the simulation instead deliberately generates data under a different model, that is a misspecification study and should be described as such. Before interpreting a poor result as weak identification, check that the generating and fitting code use the same parameter definitions, time scale, covariate coding, baseline hazard, and censoring convention.
Designing the Repeated-Sampling Experiment
Choose the target parameters and values before generating data. Select study features that matter for information: number of subjects, visit times, marker measurement error, event frequency, censoring, and the random-effects covariance. For a shared-parameter question, vary \(\alpha\) across scenarios while keeping the other features controlled. If the random-slope variance is near zero, for example, the data may carry little information about the slope-related part of the trajectory and its contribution to the hazard.
For each replicate, generate subjects, marker observations, event and censoring times according to the specified design, then fit the prespecified model. Record the estimate, its standard error or interval, convergence status, and any predeclared diagnostics. A convergence flag alone is not enough to define a usable fit. The rule might also require a finite estimate, a finite uncertainty estimate, and a gradient norm below a stated threshold. Apply the same rule in every scenario, and report it.
Record the true parameter values, sample size, visit schedule, event and censoring mechanisms, and fitting settings.
Repeat the full data-generation and fitting process. Save estimates, intervals, and diagnostics, including failed fits.
Calculate bias, interval coverage, and the optimizer failure rate using clearly defined denominators.
Look for systematic changes as sample size, event information, or association strength changes; interpret patterns in light of the model and design.
Recovery Measures and Their Interpretation
Suppose \(R\) replicates are generated, the true value of a scalar parameter is \(\theta\), and \(\hat{\theta}_r\) is its estimate in replicate \(r\). If all \(R\) fits are usable, the empirical bias is the average estimation error:
A positive value means estimates tend to exceed the generating value in this simulation; a negative value means they tend to fall below it. Bias near zero does not guarantee useful estimation: large variability can still make estimates unreliable. Report the empirical standard deviation of the estimates as well, and distinguish it from the average model-based standard error.
For nominal \(100(1-\alpha)\%\) intervals \([L_r,U_r]\), empirical coverage is the proportion of intervals that include the true value:
Coverage near the nominal level is desirable over repeated samples under the specified scenario. It does not mean that a particular reported interval has that probability of containing a fixed parameter. Also report interval width: a procedure can obtain high coverage simply by producing very wide intervals.
Let \(F\) of the \(R\) fitting attempts meet the prespecified failure rule. The empirical optimizer failure rate is \(F/R\). State what counts as failure and whether failed fits are excluded from the bias and coverage calculations. Excluding them can make the reported summaries look better than the procedure as a whole. Report failure rates separately, and, when reporting conditional summaries among successful fits, label them clearly.
Worked Examples
Worked Example: Calculating Empirical Bias
In a hypothetical simulation, the true association parameter is \(\alpha=0.50\). Five successful fits give estimates \(0.42,\ 0.61,\ 0.47,\ 0.55,\ 0.40\). Calculate the empirical bias for these replicates.
The mean estimate is \( (0.42+0.61+0.47+0.55+0.40)/5=2.45/5=0.49 \). Therefore, \( \widehat{\operatorname{Bias}}=0.49-0.50=-0.01 \). Equivalently, the five estimation errors sum to \(-0.05\), and \(-0.05/5=-0.01\).
The estimates have a small negative average error in these five replicates. This is only a miniature illustration: five replicates cannot establish that bias is negligible. The spread of the estimates and the Monte Carlo uncertainty in the estimated bias also matter.
Worked Example: Calculating Interval Coverage
A hypothetical simulation has \(R=20\) successful fits for a parameter whose true value is \(\gamma=0.30\). Eighteen of the 20 reported 95% intervals contain \(0.30\). The estimated coverage is \(18/20=0.90\), or 90%.
This result is below the nominal 95% level, but the small number of replicates makes the estimate noisy. Treating each coverage indicator as a Bernoulli outcome, an approximate Monte Carlo standard error is \( \sqrt{0.90(1-0.90)/20}=\sqrt{0.0045}=0.0671 \). Thus the coverage estimate itself has substantial simulation uncertainty. More replicates are needed to assess whether the apparent shortfall is systematic.
The 90% describes the fraction of intervals covering the fixed generating value in this simulated set of repeated data sets. It is not a 90% probability that the true \(\gamma\) lies in any one of those intervals.
Worked Example: Summarizing Optimizer Failures
For a hypothetical scenario, 100 data sets are generated and fitted. The prespecified rule labels a fit failed if the optimizer does not report convergence or if the final estimate or standard error is nonfinite. Seven fits meet this rule. The failure rate is \(7/100=0.07\), or 7%.
Suppose the remaining 93 fits have a mean association estimate of \(0.46\), while the generating value is \(0.50\). The successful-fit average error is \(0.46-0.50=-0.04\). This is a conditional summary among successful fits, not a summary of the full fitting procedure. Report both the \(-0.04\) successful-fit bias estimate and the 7% failure rate; otherwise, readers might overlook selective loss of difficult replicates.
The failure rate alone does not diagnose the cause. Inspect failed fits for patterns such as boundary variance estimates, extreme association estimates, or sensitivity to starting values, while using the same criteria across scenarios.
A Short Justification for Monte Carlo Precision
Simulation summaries are themselves estimates because only finitely many replicates are run. For coverage, define \(C_r=I(L_r\leq\theta\leq U_r)\), which equals 1 for coverage and 0 otherwise. If replicates are generated independently under the same scenario and the probability of coverage is \(q\), then \(C_r\) has variance \(q(1-q)\). The sample average of \(R\) such indicators has variance \(q(1-q)/R\), giving the estimated Monte Carlo standard error
This formula explains why a small simulation can give a noisy coverage estimate even when the fitting procedure is unchanged. For estimated bias, if the replicate estimates have empirical standard deviation \(s_{\hat{\theta}}\), the Monte Carlo standard error of their mean error is \(s_{\hat{\theta}}/\sqrt{R}\), provided the same set of replicates is used. Increasing \(R\) reduces Monte Carlo uncertainty; it does not fix a flawed model or an inadequate study design.
Reading Patterns, Comparisons, and Failure Modes
A useful recovery study compares a small number of planned scenarios rather than reporting one isolated result. For example, compare a larger and smaller sample size, or a stronger and weaker association parameter, while holding other design features fixed. If weak association scenarios show more variable \(\hat{\alpha}\), poor coverage, or more optimizer failures, that pattern is evidence that this model-and-design combination provides less reliable estimation of \(\alpha\). It is not, by itself, proof that no estimator can identify the parameter.
Parameter-recovery simulation complements, rather than replaces, diagnostics from fitting the observed data. Information-matrix eigenvalues and Hessian-based uncertainty estimates describe local features of a fitted likelihood or posterior approximation. Recovery evaluates repeated behavior under the chosen simulation scenarios. Disagreement between these views is a reason to investigate, not a reason to select whichever summary is more reassuring. For Bayesian fitting, define in advance whether intervals are credible intervals and assess the relevant posterior summaries across replicated data sets; do not treat optimizer failure criteria as a substitute for MCMC diagnostics.
Several practical checks help distinguish genuine weak recovery from a simulation or implementation error:
- Verify generation. Check that simulated event and marker data have the intended scales, event frequency, censoring, and random-effects variation.
- Verify parameter mapping. Confirm that a covariance parameter, standard deviation, and association coefficient mean the same thing in the generator and fitted model.
- Use stable fitting settings. Keep scaling, integration accuracy, starting-value strategy, and stopping rules consistent with the intended analysis.
- Inspect more than averages. Plot or tabulate estimates, interval widths, boundary estimates, and failures; a small mean bias can hide extreme or multimodal estimates.
- Increase replication when needed. If Monte Carlo standard errors are large relative to the differences between scenarios, the simulation does not yet resolve those differences.
The main alternatives answer different questions. An information-matrix or Hessian diagnostic examines local information at a fitted solution; it is faster but can miss finite-sample bias or failure to reach that solution. A recovery simulation directly examines repeated-sample behavior under specified conditions, but its conclusions are only as relevant as its scenarios and its data generator. A larger sample size may improve some forms of recovery, but it cannot automatically resolve model misspecification, a poorly chosen time scale, or a parameter that the specified design barely informs.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A simulation uses 200 replicates and 184 95% intervals contain the generating value. What is the empirical coverage?
- In 80 simulated fits, 4 meet a prespecified optimizer-failure rule. What failure rate should be reported?
- Why is a near-zero average bias not enough to conclude that a parameter is recovered reliably?
- What does a recovery simulation establish, and what does it not establish about an applied data set?
Solutions. (1) The empirical coverage is \(184/200=0.92\), or 92%. (2) The failure rate is \(4/80=0.05\), or 5%, using all attempted fits as the denominator. (3) Positive and negative errors can cancel in the average; estimates may still be highly variable, intervals may have incorrect coverage, or failures may occur. (4) It describes estimator behavior under the specified generating scenarios and fitting procedure. It does not prove that the model is correct for an applied data set or guarantee recovery under conditions not represented in the simulation.