Tutorials › Population Pharmacokinetics › Worked Example: Comparing Search Strategies by Simulation

Covariate Selection Strategies and Their Statistics · Tutorial 310 of 599

Worked Example: Comparing Search Strategies by Simulation

Learn how to design and interpret a simulation that compares covariate search strategies against a known population PK model.

Advanced 11 min read

What You'll Learn

  • Specify a population PK simulation with known covariate effects and a shared structural model.
  • Define exact model recovery, false inclusions, and missed effects with clear denominators.
  • Compare forward and backward search with exhaustive BIC-penalized subset selection.
  • Calculate and interpret selection performance across repeated simulated datasets.
  • Recognize how simulation assumptions, convergence, and Monte Carlo error affect conclusions.
  • Distinguish a scenario-specific comparison from a general ranking of selection methods.

Why Compare Search Strategies by Simulation?

A covariate search procedure is judged not only by whether it finds a statistically supported model in one dataset, but also by how often it identifies the covariates that truly affect the parameter of interest. In real data, that true model is unknown. Simulation makes a controlled comparison possible: specify a population PK model with known covariate effects, repeatedly generate datasets from it, apply each search strategy, and measure what each method selects.

The result is not a universal ranking. It describes performance under the particular population model, sample size, sampling schedule, covariate distribution, residual variability, and selection rules simulated. A method that performs well when covariates are independent and effects are strong may behave differently with correlated covariates, sparse individual information, or weaker effects.

Definition: In a covariate-selection simulation, the true model is the model used to generate the data. Exact recovery occurs when a selection procedure returns precisely the true set of covariate effects. A false inclusion is a selected covariate with no effect in the generating model; a missed effect is a true covariate effect that the procedure does not select.

These definitions separate three questions that can otherwise be conflated. Exact recovery summarizes whether the whole selected model is correct. False inclusions measure unnecessary effects, while missed effects measure failure to retain true effects. A procedure can have a low false-inclusion count but miss several real effects, or detect most real effects while also selecting noise.

A Hypothetical Population PK Simulation

Consider a hypothetical one-compartment intravenous bolus model. For individual \(i\), dose \(D\), and sampling time \(t_{ij}\), concentration is generated as

$$ C_{ij}=\frac{D}{V_i}\exp\left(-\frac{CL_i}{V_i}t_{ij}\right)\exp(\epsilon_{ij}). $$

Clearance and volume are generated as

$$ CL_i=5\exp(0.25x_{i1}-0.22x_{i2}+\eta_i),\qquad V_i=50\exp(\zeta_i). $$

Here \(CL_i\) is in L/h, \(V_i\) is in L, dose is in mg, time is in hours, and concentration is in mg/L. The six covariates \(x_{i1},\ldots,x_{i6}\) are standardized, independent variables with mean zero and standard deviation one. Only \(x_{i1}\) and \(x_{i2}\) affect clearance in the generating model; \(x_{i3},\ldots,x_{i6}\) are null candidates. The random effects are independent with \(\eta_i\sim N(0,0.25^2)\) and \(\zeta_i\sim N(0,0.20^2)\); the residual errors are independent with \(\epsilon_{ij}\sim N(0,0.15^2)\). Thus the residual error is lognormal on the concentration scale.

Suppose each replicate contains 240 individuals, each observed at 0.5, 1, 2, 4, 8, and 12 hours after dosing. Every candidate model uses the same structural model, random-effects structure, residual model, and fitting procedure. Candidate covariate effects are tested on clearance, not volume. This common setup is essential: otherwise differences attributed to search strategy could instead arise from different structural assumptions or data handling.

Assumptions for interpreting this comparison: The generating and fitted structural models are correctly specified; the stated covariate effects and random-effects distributions generate the data; observations and simulation replicates are generated as specified; and model fitting converges adequately. These conditions define the controlled experiment, not guarantees about an applied dataset.

Worked Example: Defining the Candidate Search

There are six candidate covariates, so there are \(2^6=64\) possible subsets, including the model with no covariate effects. Define three procedures before simulating.

Forward selection. Start with no covariate effects. At each step, add the eligible covariate with the smallest likelihood-ratio-test \(p\)-value if that value is below 0.05; stop when no eligible addition meets the rule.

Backward selection. Start with all six effects. At each step, remove the effect with the largest likelihood-ratio-test \(p\)-value if that value exceeds 0.05; stop when no eligible removal meets the rule. These are nominal, sequential rules, and their repeated testing is part of the procedure being evaluated.

Penalized subset selection. Fit all 64 subsets and choose the subset with the smallest Bayesian information criterion, \(BIC=-2\ell+k\log(n)\), where \(\ell\) is the maximized log-likelihood, \(k\) is the number of estimated parameters, and \(n=240\) individuals. The candidate effects contribute to \(k\); parameters common to all models are also counted consistently. This is a complexity-penalized comparison, not a sequence of 0.05 tests.

The simulation must use the same six candidates and the same likelihood basis for all three procedures. For example, comparing BIC calculated with \(n=240\) individuals to a criterion using the 1,440 concentration records as independent observations would change the penalty and would not be the stated procedure.

Performance Measures and Their Denominators

For each simulated dataset, record which of the six effects the procedure selects. Across replicates, count exact recoveries, false inclusions, and missed effects. The denominators matter: with 100 replicates, there are 100 opportunities for each true effect to be missed, hence 200 true-effect opportunities; there are 400 null-effect opportunities because four null covariates are considered in each replicate.

$$ \text{False-inclusion rate}= \frac{\text{total selected null effects}}{\text{number of null-effect opportunities}}, \qquad \text{Miss rate}= \frac{\text{total missed true effects}}{\text{number of true-effect opportunities}}. $$

A rate based on opportunities is not the same as the proportion of replicates containing at least one error. Both can be useful, but they answer different questions. State which one is reported. Exact recovery is the number of replicates selecting precisely \(x_1\) and \(x_2\), divided by the number of replicates.

Worked Example: Summarizing 100 Simulated Datasets

Suppose the hypothetical simulation produces the following aggregate results. False inclusions and missed effects are totals over all 100 fitted datasets, not counts of datasets with at least one error.

ProcedureExact recoveryFalse inclusionsMissed true effects
Forward60/100 = 60%39/400 = 9.75%26/200 = 13.0%
Backward67/100 = 67%28/400 = 7.00%30/200 = 15.0%
BIC subset selection72/100 = 72%18/400 = 4.50%36/200 = 18.0%

For example, the forward false-inclusion rate is \(39/400=0.0975\), or 9.75%. Its missed-effect rate is \(26/200=0.13\), or 13.0%. The denominator of 200 arises from two true effects in each of 100 replicates. The rates show that, in this hypothetical setting, BIC selection has the highest exact-recovery proportion and the lowest false-inclusion rate, but the highest missed-effect rate among the three. It is not accurate to call one method simply “best” without stating which performance goal matters.

The totals are internally interpretable. For forward selection, 26 missed effects mean that 174 of the 200 possible true-effect selections were made. For BIC, 36 misses mean 164 true-effect selections. Exact recovery requires both true effects and no null effects in a replicate; it is therefore a stricter outcome than detecting each effect frequently across all replicates.

Comparing Methods on the Same Replicates

When procedures are applied to the same simulated datasets, their outcomes are paired. A direct comparison of exact recovery should preserve that pairing: each replicate provides a matched result for forward and backward selection. The difference in marginal recovery percentages alone does not show how often the two methods agree or which replicates account for their difference.

Worked Example: Paired Exact-Recovery Outcomes

Suppose the 100 replicates yield the following paired counts for forward and backward selection.

Paired outcomeNumber of replicates
Both procedures recover the exact model48
Forward only recovers the exact model12
Backward only recovers the exact model19
Neither recovers the exact model21

The counts sum to \(48+12+19+21=100\). Forward exact recovery is \(48+12=60\) replicates, or 60%; backward exact recovery is \(48+19=67\), or 67%. The two discordant groups contain \(12+19=31\) replicates. The number in which the procedures agree on exact recovery status—both succeed or both fail—is \(100-31=69\), also \(48+21=69\).

Backward selection has seven more exact recoveries than forward selection in these paired replicates, a difference of \(19-12=7\) percentage points. The 69 agreeing replicates do not contribute to that difference. These counts describe the simulated comparison; they do not establish that backward selection will outperform forward selection in other settings.

Why the Simulation Results Need Diagnostics

A selection summary is only meaningful if the simulation and fitting pipeline behave as intended. Check the generating code against the stated model, including the signs and magnitudes of the two nonzero effects and the zero effects for the remaining candidates. Check that units, sampling times, covariate standardization, and error distributions are correct. A coding error that gives a null candidate a nonzero coefficient invalidates the labels used to count false inclusions.

Also inspect fit failures by method and replicate. Record convergence status, boundary estimates, implausible parameter estimates, and whether likelihood comparisons use comparable converged fits. Quietly dropping difficult replicates can bias the comparison, especially if one selection procedure fails more often. Report how failures are handled and how many occurred. A simulation with many failed fits does not support a clean ranking of selection performance.

Monte Carlo variation is another diagnostic. Even with a fixed generating scenario, a finite number of replicates gives a noisy estimate of a method’s recovery rate. For a proportion \(\hat p\) estimated from \(R\) independent replicates, its approximate Monte Carlo standard error is \(\sqrt{\hat p(1-\hat p)/R}\). At 72% recovery with \(R=100\), this is \(\sqrt{0.72(0.28)/100}=0.0449\), or about 4.49 percentage points. That amount of simulation error cautions against treating a small difference in estimated recovery as decisive. For comparisons on shared replicates, paired uncertainty should use the replicate-level paired outcomes rather than treating the two proportions as independent.

What the Comparison Can and Cannot Establish

Forward and backward procedures use sequential testing rules. Their result can depend on entry or removal thresholds, ordering among eligible effects, and the effect of earlier selections on later tests. BIC subset selection instead searches all candidate subsets and trades fit against a penalty for model size. This exhaustive approach is feasible here because six candidates produce only 64 subsets; it may become computationally impractical with many candidates. The methods therefore differ in both search path and decision criterion.

The simulation supports a conditional statement: under the specified model and design, the recorded performance estimates were as shown. It does not prove that the generating model is scientifically correct, that BIC is generally superior, or that a selected covariate causes a change in clearance. Independence among the simulated covariates is especially consequential: correlated candidates can make effects harder to distinguish, and the performance comparison may change. Other scenarios can vary covariate correlation, effect size, sample size, residual error, sampling schedule, random-effects variability, and structural-model correctness.

A useful extension is to repeat the comparison across a planned set of scenarios, changing one or more design features at a time. The earlier material on simulation-based evaluation of covariate search procedures, power analysis, bootstrap stability, and cross-validation addresses related evaluation questions. Here, the central lesson is to make the generating truth known, define the decision rules in advance, use common replicates, and report multiple error measures with explicit denominators.

Common Pitfalls

  • Using only exact recovery. Two procedures can have similar exact-recovery proportions but different balances of false inclusions and missed effects. Report each performance measure relevant to the decision.
  • Confusing opportunities with datasets. A false-inclusion rate based on 400 null-covariate opportunities is not the same as the percentage of 100 datasets with at least one false inclusion. Name the denominator.
  • Ignoring pairing. The procedures were applied to the same replicates. Their concordance and discordance should be counted on those matched datasets, not inferred from marginal percentages.
  • Generalizing beyond the scenario. A result from independent standardized covariates and a particular sampling design does not settle performance under collinearity or sparse sampling.
  • Counting failed fits as ordinary selections. Convergence failures require explicit reporting and a prespecified handling rule; they are not automatically correct model selections.
Key takeaway: A simulation comparison is a controlled, scenario-specific assessment. Define the true model, selection rules, metrics, and denominators before running it; then interpret recovery, false inclusion, missed effects, and fit diagnostics together.

Check Your Understanding

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

  1. In a simulation with 150 replicates, three true effects, and five null candidates per replicate, what are the total numbers of true-effect and null-effect opportunities?
  2. A method selects 45 null effects across 150 replicates with five null candidates per replicate. What is its false-inclusion rate?
  3. In 100 paired replicates, forward-only exact recovery occurs 9 times and backward-only exact recovery occurs 14 times. How many replicates are discordant, and which method has the larger marginal exact-recovery count?
  4. Why can a method with the lowest false-inclusion rate still fail to have the highest exact-recovery proportion?
  5. What does a 72% exact-recovery estimate from 100 simulated replicates establish, and what does it not establish?

Solutions. (1) There are \(150\times3=450\) true-effect opportunities and \(150\times5=750\) null-effect opportunities. (2) The rate is \(45/750=0.06\), or 6.00%. (3) There are \(9+14=23\) discordant replicates; backward has the larger marginal exact-recovery count by \(14-9=5\), while agreeing replicates contribute equally to both marginal totals. (4) A procedure can avoid selecting null effects yet miss true effects; exact recovery requires selecting all true effects and no null effects in the same replicate. (5) It estimates exact recovery for the specified generating scenario, with Monte Carlo variability; it does not establish universal performance or validate the generating model as scientifically true.

Clinical Biostats