Documentation

41.22 Case 5: stability selection, and how often each candidate is chosen

Stability selection: how often each candidate is chosen

What you will learn

  • Read a selection probability, its interval, sign stability and algorithm agreement.
  • Verify the arithmetic of a stability run: fits scheduled, average selected set size, the interval.
  • See why probabilities from different resampling designs must not be compared.
  • Treat a disagreement among learners as information about a candidate.

Prerequisites: 41.19 to 41.21.

The question: if the study were repeated on a random half of the subjects, how often would each candidate be selected, and do different statistical learners agree?

The evidence: the Chapter 24 bundles primary, posterior_mean, bootstrap and all_learners.

What stability selection does

The frozen screen and the SCM each give one answer from one data set. Stability selection asks a different question: how much does the answer depend on which subjects happened to be in the study?

  1. Draw a random half of the subjects (a complementary pair: the half and its complement are both used).
  2. In each half, take each subject's individual random-effect estimates from the base fit as a response and the candidate covariates as predictors, and fit a learner, a penalised or nonparametric regression that selects covariates.
  3. Record which candidates the learner selected.
  4. Repeat, and report for each candidate the selection probability: the fraction of fits in which it was selected.

Two features set it apart from the earlier pages. It uses the individual estimates the base fit already produced (no NONMEM-style refit per replicate), so it is cheap; and the spread of a candidate's selection across subsets is the evidence, not a p-value.

The default command is

nlmx cov … --method posterior --seed 24048 --replicates 60 --draws-per-resample 2 \
           --write-subject-level --write-replicate-selections

The run's arithmetic

Item Value Check
Replicates (half-sample pairs) 60 set by --replicates
Posterior draws per resample 2 set by --draws-per-resample
Learners 3 adaptive elastic net (primary), group elastic net, weighted GLS
ETA dimensions 2 one response per random effect
Fits scheduled 720 60 × 2 × 3 × 2 = 720, all completed, 0 failed
Fits per learner 240 720 / 3

The base fit's random effects are checked first, to show the two-stage approach is consistent with the model: for each ETA, the variance of the individual estimates plus the mean posterior variance should reproduce OMEGA.

ETA Variance of estimates Mean posterior variance Sum OMEGA Relative error
1 (CL) 0.06684 0.00427 0.07111 0.07087 0.34 %
2 (V) 0.06533 0.00402 0.06936 0.06901 0.50 %

The sum is within half a percent in both cases, so the individual estimates are a faithful stand-in for the random effects. Shrinkage (2.9 % and 2.7 %) is low, which is the other condition for them to be informative.

The result table

Candidate Selection probability 95 % interval Sign stability Algorithm agreement IIV explained Class
V ~ WT 0.950 0.90–0.98 1.00 1.00 47.1 % retained
CL ~ WT 0.833 0.76–0.89 1.00 1.00 24.3 % retained
CL ~ EGFR 0.717 0.63–0.79 1.00 0.67 17.9 % uncertain
V ~ SEX 0.025 0.01–0.07 1.00 0.00 0.0 % rejected
CL ~ SEX 0.017 0.00–0.06 1.00 0.00 0.0 % rejected

Classes follow the rule printed in the report: ≥ 0.80 retained, 0.55 to below 0.80 uncertain, below 0.55 rejected. Sign stability is the proportion of selected coefficients that share the dominant sign; it is 1.00 for every candidate, so no selected effect flips direction. Algorithm agreement is the fraction of learners whose own selection probability reaches the threshold (the required fraction is 0.67 by default). IIV explained is the report's estimate of the share of the random effect's variance that the candidate accounts for: about 47 % of the variability in volume for V ~ WT, and 24 % and 18 % of the variability in clearance for CL ~ WT and CL ~ EGFR.

Checking the numbers

The selection probabilities are fractions of 120 selections (60 replicates × 2 draws) for the primary learner: 0.8333 = 100/120, 0.7167 = 86/120, 0.95 = 114/120, 0.025 = 3/120, 0.0167 = 2/120. The stored 95 % intervals are Wilson score intervals; for 100/120 the Wilson interval is [0.7565, 0.8894], exactly the stored value, and for 86/120 it is [0.6303, 0.7896].

The average selected set size reported, 2.54, is the sum of the five probabilities: 0.950 + 0.833 + 0.717 + 0.025 + 0.017 = 2.542. A typical replicate picks between two and three of the five candidates.

The per-learner view

Candidate Adaptive elastic net Group elastic net Weighted GLS
V ~ WT 0.950 1.000 1.000
CL ~ WT 0.833 0.983 0.917
CL ~ EGFR 0.717 1.000 0.900
V ~ SEX 0.025 0.350 0.075
CL ~ SEX 0.017 0.283 0.008

CL ~ EGFR is uncertain only because the primary learner is conservative: the other two learners select it in 90 to 100 % of the fits. That is exactly what an agreement of 0.67 (two of three) means. An adaptive penalty shrinks weaker effects harder, which would explain it, though the stored results do not isolate the cause. Whether that conservatism is a virtue is a question about the analysis plan: if the plan names one primary learner, its class stands; this page's value is that the reason is visible.

The false-selection guard is also in the report: with a retention threshold of 0.80 the bound on the expected number of falsely selected candidates (the per-family error rate bound) is 1.084, and the target of 1.00 would need a threshold of 0.817. The report notes that this bound assumes exchangeable candidates and half-samples and is approximate for dependent covariates. Both retained candidates (0.833 and 0.95) pass the 0.817 line as well, so the result does not depend on which threshold is used; CL ~ EGFR at 0.717 does not pass either.

Four runs, four designs

Candidate primary posterior_mean bootstrap all_learners
V ~ WT 0.950 0.942 1.000 0.967
CL ~ WT 0.833 0.875 0.942 0.850
CL ~ EGFR 0.717 0.758 0.908 0.767
V ~ SEX 0.025 0.000 0.033 0.033
CL ~ SEX 0.017 0.017 0.033 0.033

What changes between the runs:

  • posterior_mean uses each subject's posterior mean as the response instead of posterior draws. The probabilities move by under 0.05: a small effect.
  • bootstrap resamples 80 % of the subjects (--resampling bootstrap --subject-fraction 0.8) instead of half. The probabilities rise for every real candidate, and CL ~ EGFR becomes retained (0.908). A larger resample has more power to select a true effect, so this is expected. The probabilities from different resampling designs are not on the same scale, and the retention threshold and the false-selection bound are calibrated for half-samples. Reporting the 0.908 as if it were comparable to 0.717 would be a mistake; the right statement is that the candidate is selected nearly always when 80 % of the subjects are used and about 70 % of the time when half are.
  • all_learners (30 replicates, six learners: the three above plus a generalised additive model, boosting and a multivariate learner) gives CL ~ WT 0.85 and CL ~ EGFR 0.77. Five of six learners select each of the two at or above 0.80 (agreement 0.83); the exceptions are boosting for CL ~ WT (0.63) and the adaptive elastic net for CL ~ EGFR (0.77). V ~ WT is selected by all six (0.93 to 1.00).

The SEX candidates are the useful negative control. No learner of the six reaches 0.80 for either, but the multivariate learner selects them 65–67 % of the time, more often than the other learners and the classes: a liberal learner can look like evidence for an effect that all the other methods and the refits reject. The threshold exists for this reason.

What the posterior engine proposes

TVCL = TVCL × (WT/72.2047)^0.7506
TVV  = TVV  × (WT/72.2047)^1.0087        ; UNCONFIRMED draft

These are median two-stage coefficients among the replicates in which the candidate was chosen, so they are close to, but not identical to, the refit values of page 41.20 (0.7268 and 1.010). The engine's final model contains only the two retained relationships; the SCM retained CL ~ EGFR as well. Page 41.23 puts the three engines side by side.

The decision

Question Evidence Decision Reversible?
Are V ~ WT and CL ~ WT stable under resampling? 0.95 and 0.83 with sign stability 1.00, five designs yes yes
Is CL ~ EGFR? 0.72 with the primary learner; 0.91 at 80 % resample; two of three learners agree moderately: report it with its probability yes
Do the SEX terms enter? 0.02–0.03 no yes

What this case does not show

Stability selection says how reproducible a selection is, not whether the selected model is correct, and not how large an effect is: the forest plot on page 41.24 does that. With 60 subjects, half-samples have 30, so the procedure is also working with small subsets; the probabilities would be more decisive with a larger study.

Review checklist

  • Can you account for every scheduled fit (replicates × draws × learners × ETAs)?
  • Do you report the resampling design next to every selection probability?
  • Do you know which learner is primary, and does the plan say so?
  • Did you look at the per-learner table before calling a candidate uncertain?

See the previous page, the next page and the complete case-study reference.