Tutorials › Quantitative Systems Pharmacology (QSP) › Virtual Populations Under Clinical Eligibility Criteria

Virtual Patient Generation · Tutorial 710 of 799

Virtual Populations Under Clinical Eligibility Criteria

Learn to apply clinical inclusion and exclusion rules first, then assess and preserve feasible subgroup frequencies in the resulting virtual cohort.

Advanced 11 min read

What You'll Learn

  • Represent clinical inclusion and exclusion criteria as a joint eligibility rule.
  • Distinguish subgroup frequencies in the candidate pool from targets among eligible virtual patients.
  • Check support and capacity before allocating eligible patients to subgroups.
  • Use weighted adjustment or stratified selection to meet feasible frequency targets.
  • Diagnose violations of eligibility, subgroup quotas, and within-subgroup representation.
  • Recognize when requested frequencies cannot be achieved from the available candidate pool.

Eligibility Defines the Population Being Represented

A virtual cohort can match several population summaries and still represent the wrong clinical population if it contains people who would not qualify for the intended study or treatment scenario. Eligibility criteria are therefore not just another set of descriptive targets: they define who belongs in the population to be represented. Age limits, biomarker thresholds, and comorbidity exclusions may also change the subgroup frequencies among the remaining candidates.

The key distinction is between the candidate population and the eligible target population. A candidate's source-population subgroup membership does not guarantee that the same subgroup frequency applies after clinical criteria have been imposed. The eligible frequencies must be calculated or specified conditional on meeting all eligibility rules.

Definition: Let candidate \(i\) have characteristics \(x_i\), and let \(E(x_i)\) be an indicator equal to 1 if that candidate satisfies every required inclusion and exclusion criterion, and 0 otherwise. The eligible set is the set of candidates for which \(E(x_i)=1\). A subgroup frequency in the eligible population is the proportion, or weighted proportion, of this set belonging to that subgroup.

For example, suppose eligibility requires age from 18 through 75 years, biomarker \(B\) at or above a threshold, and absence of a specified comorbidity. Eligibility is the conjunction of these conditions: a candidate qualifies only if all three are satisfied. A candidate who meets the biomarker threshold but is outside the age range is ineligible. The final rule must be applied to the same patient-level characteristics that define the virtual candidates.

Apply the Full Rule Before Matching Eligible Frequencies

Write the rule explicitly before selecting patients. For a candidate with age \(a_i\), biomarker value \(b_i\), and comorbidity indicator \(c_i\), one possible rule is

$$ E(x_i)=I(18 \le a_i \le 75)\,I(b_i \ge 2.0)\,I(c_i=0). $$

Here \(I(\cdot)\) equals 1 when its condition is true and 0 otherwise. The specified cutoff, units, inclusivity of boundary values, and coding of exclusions must match the intended clinical definition. If a candidate has a missing biomarker value, the rule needs an explicit missing-data policy; silently treating missing values as below or above threshold changes eligibility.

Once the eligible set is identified, define subgroup targets for that population. For mutually exclusive and exhaustive strata \(g=1,\ldots,G\), write the desired eligible frequencies as \(q_g\), where \(q_g \ge 0\) and \(\sum_g q_g=1\). If the desired cohort size is \(N\), exact integer allocations \(n_g\) should satisfy \(\sum_g n_g=N\) and be as close as possible to \(Nq_g\), subject to the available eligible candidates. Rounding must not make the allocations sum to a number other than \(N\).

If candidates have existing nonnegative weights \(w_i\), the eligible weighted mass in stratum \(g\) is \(W_g=\sum_i w_i E(x_i)I(i\in g)\), and total eligible mass is \(W=\sum_g W_g\). The eligible source frequency is \(p_g=W_g/W\), provided \(W>0\). It is \(p_g\), not the frequency before applying \(E\), that should be compared with the target \(q_g\).

Why Eligibility Must Come First

The order follows from what the target quantities mean. A clinical subgroup target such as “30% of eligible patients are in the high-severity stratum” is conditional on eligibility. Applying subgroup matching to the unfiltered candidates instead matches a different population. Filtering afterward can then alter the achieved frequencies.

For disjoint strata with positive eligible mass, a simple weight adjustment illustrates the relationship. Multiplying every eligible weight in stratum \(g\) by \(q_g/p_g\) changes its share to \(q_g\), because its adjusted mass is \(W_g(q_g/p_g)=Wq_g\). The total adjusted mass is \(W\sum_g q_g=W\). This argument assumes \(p_g>0\) whenever \(q_g>0\); if no eligible candidates exist in a target stratum, the adjustment is undefined and the target cannot be met from this pool.

$$ \frac{W_g(q_g/p_g)}{\sum_h W_h(q_h/p_h)} = \frac{Wq_g}{W\sum_h q_h} =q_g. $$

This identity establishes the adjusted weighted frequencies, not a guarantee that a finite random sample will have exactly those frequencies. To achieve exact integer subgroup counts, use an allocation such as stratified selection: select the prescribed number from each eligible stratum. The within-stratum selection procedure determines which eligible candidates represent each stratum; the quotas determine the stratum counts.

Worked Example: Applying Three Clinical Criteria and Allocating Strata

Consider a hypothetical pool of 1,000 candidates. The age criterion retains 700; among those, 420 meet the biomarker cutoff; among those, 300 have no excluded comorbidity. These are sequential counts, so the last count represents candidates satisfying all three criteria. The final eligible pool is partitioned into age strata: 120 aged 18–49 years, 110 aged 50–64 years, and 70 aged 65–75 years.

Suppose the target frequencies among eligible virtual patients are 40%, 35%, and 25%, respectively, and the required cohort size is \(N=200\). The target allocations are \(200(0.40)=80\), \(200(0.35)=70\), and \(200(0.25)=50\). They sum to 200 and do not exceed the eligible counts of 120, 110, and 70, so the allocations are feasible.

The eligible-pool frequencies are \(120/300=0.400\), \(110/300=0.3667\), and \(70/300=0.2333\). Their differences from target are small but not zero. With equal starting weights, the stratum adjustment factors are \(0.40/0.40=1.000\), \(0.35/0.3667\approx0.9545\), and \(0.25/0.2333\approx1.071\). These factors adjust eligible weights; they do not alter anyone's eligibility.

For exact counts, select 80 of the 120 eligible candidates aged 18–49, 70 of the 110 aged 50–64, and 50 of the 70 aged 65–75. The resulting frequencies are \(80/200=40\%\), \(70/200=35\%\), and \(50/200=25\%\). Every selected candidate must still satisfy all three clinical criteria.

Feasibility Is a Population-Level Check

Before adjusting weights or drawing a cohort, check whether each requested subgroup has eligible support and enough eligible candidates for its allocation. If \(M_g\) is the number of eligible candidates available in stratum \(g\), exact selection without replacement requires \(n_g\le M_g\). For weighted candidates, positive eligible mass is necessary for a positive target, but a very small mass can still make a target practically unstable or dependent on a few highly weighted candidates.

A target can also be incompatible with other requirements. For instance, subgroup quotas must add to the cohort size, and the subgroup definitions used for a quota must be sufficiently clear to identify every candidate's allocation. If a target is infeasible, changing weights cannot create eligible candidates who are absent from the pool. The defensible options are to revise the target if scientifically justified, expand or regenerate the candidate pool, or report that the requested cohort cannot be constructed from the available candidates.

Worked Example: Detecting an Impossible Target

A hypothetical eligible pool contains 200 candidates after applying the age, biomarker, and comorbidity rules. Only 25 eligible candidates are aged 65–75 years. A requested cohort of 100 is meant to contain 30% in that age stratum, requiring \(100(0.30)=30\) such candidates.

The availability check fails: \(30>25\). Even selecting every eligible candidate aged 65–75 yields at most \(25/100=25\%\), below the requested 30%. No finite weight multiplier can supply the five missing eligible candidates. Replacing the eligibility rule with a looser age criterion would change the target population, so it is not a harmless computational fix. The appropriate report is that the target is infeasible for this candidate pool, followed by a justified decision to enlarge the pool or reconsider the target.

Feasibility should be checked on the final eligible set, not inferred from the initial pool. A subgroup abundant before filtering may be scarce afterward, especially if a biomarker threshold or exclusion is associated with subgroup membership.

Construct and Audit the Cohort

For a fixed-size cohort with exact quotas in disjoint strata, stratified selection is direct: determine eligible candidates, compute feasible integer quotas, then select within each stratum. If selection within a stratum uses unequal candidate weights, those weights govern representation within that stratum; they do not change the quota itself. Weighted adjustment is useful when a weighted virtual population, rather than an exact unweighted count, is the intended output.

After construction, audit the result against the rule and targets. At minimum, recompute eligibility from the selected patient records, count each mutually exclusive stratum, calculate the achieved frequency, and compare it with the requested frequency. Also inspect the eligible source counts and the selected fraction within each stratum. A nominally correct quota can conceal a fragile result if nearly every candidate in one stratum had to be selected or if a handful of candidates carry most of its weight.

Worked Example: Checking an Exact Eligible Cohort

A hypothetical eligible pool has 150 mild, 70 moderate, and 20 severe disease candidates. The requested cohort has \(N=100\), with target frequencies 50%, 35%, and 15%. The required quotas are \(50\), \(35\), and \(15\), which sum to 100. Each quota is available: \(50\le150\), \(35\le70\), and \(15\le20\).

Suppose stratified selection produces those quotas. The achieved frequencies are \(50/100=0.50\), \(35/100=0.35\), and \(15/100=0.15\), exactly matching the targets. The sampling fractions are \(50/150=0.3333\) for mild, \(35/70=0.5000\) for moderate, and \(15/20=0.7500\) for severe. These fractions show that the severe stratum has less selection headroom: three quarters of its eligible candidates are used.

The audit is not complete until all 100 selected records are re-evaluated against every inclusion and exclusion condition. If even one selected candidate fails the biomarker threshold, the cohort has an eligibility violation despite its correct subgroup counts. Conversely, if every selected record qualifies and the counts match, the quota and eligibility checks pass; this alone does not establish that other patient characteristics are well represented.

Diagnostics, Alternatives, and Limitations

Common warning signs include selected patients who fail a boundary rule, achieved subgroup frequencies calculated with the wrong denominator, target quotas exceeding available eligible counts, and missing values silently assigned to eligible or ineligible categories. Denominators matter: a frequency among the original candidates is not the frequency among eligible candidates, and neither is automatically the frequency in the final selected cohort.

The main alternatives serve different purposes. Hard filtering followed by stratified selection enforces eligibility and exact counts for disjoint strata. Weight adjustment can match weighted frequencies without fixing the realized counts of a random finite sample. Rejection sampling can produce eligible candidates by discarding failures, but may be inefficient when eligibility is rare and does not by itself ensure subgroup quotas. None of these approaches makes an unsupported target feasible.

ApproachWhat it controlsMain caution
Eligibility filtering, then stratified selectionHard eligibility and exact counts in specified disjoint strataRequires adequate eligible candidates in every stratum
Eligible weight adjustmentWeighted subgroup frequenciesFinite samples may not realize exact counts; concentrated weights can be fragile
Rejection samplingAcceptance of candidates satisfying the ruleCan be inefficient and does not alone enforce subgroup frequencies

A subgroup-frequency match is a limited guarantee. It does not establish that the cohort represents within-subgroup distributions or relationships among characteristics. Those properties need their own assessment. Eligibility itself also depends on accurate, consistently coded candidate attributes: a correctly implemented rule cannot repair a mismeasured biomarker or an incorrectly defined comorbidity exclusion.

A frequent mistake is to match subgroup frequencies in the full candidate pool and then apply the clinical exclusions. The reasoning is that the cohort already has the requested percentages, so filtering should leave them intact. This is wrong whenever eligibility differs across subgroups: filtering changes the denominator and can change each subgroup's share. The correction is to apply the complete clinical rule first, define or calculate subgroup frequencies in the eligible population, check feasibility, and then construct the cohort.

Key takeaway: Eligibility determines the population to be represented. Apply every clinical rule before assessing subgroup frequencies, verify that requested quotas are supported by eligible candidates, and audit eligibility and achieved frequencies separately.

Check Your Understanding

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

  1. A candidate must be aged 20–70 years, have biomarker \(B\ge1.5\), and have no specified comorbidity. State the eligibility rule using indicators.
  2. After eligibility filtering, 80 of 200 candidates are in a target subgroup. A cohort of 100 is requested with 45% in that subgroup. Is the target feasible by selection without replacement?
  3. Why can matching a subgroup to 40% in the candidate pool fail to produce 40% among eligible candidates?
  4. A weighted eligible pool has total weight 500, of which 150 is in a disjoint stratum. The target frequency for that stratum is 35%. What is its weight adjustment factor?

Solutions. (1) \(E(x_i)=I(20\le a_i\le70)I(b_i\ge1.5)I(c_i=0)\), where \(c_i=1\) indicates the excluded comorbidity. (2) Yes: the target requires \(100(0.45)=45\) candidates, and 80 are available, so \(45\le80\). (3) The eligibility rule can remove candidates at different rates across subgroups, changing the subgroup denominator and share; frequencies must be assessed after filtering. (4) The eligible source frequency is \(150/500=0.30\), so the factor is \(0.35/0.30\approx1.167\). This adjustment sets the weighted share to 35% when applied to that stratum's eligible weights and the other stratum weights remain unchanged.

Clinical Biostats