An interactive guide to penalized Cox regression methods available in ClinicoPath. Helps clinicians, pathologists, radiologists, and oncologists choose the right analysis for their data and research question. No data or variables required.
Usage
lassointro(
showOverview = TRUE,
showDecisionGuide = TRUE,
showClinicalScenarios = FALSE,
showAssumptions = FALSE,
showGlossary = FALSE
)Arguments
- showOverview
Show overview of all penalized Cox regression methods
- showDecisionGuide
Show decision flowchart for choosing the right method
- showClinicalScenarios
Show worked examples for pathology, radiology, and oncology
- showAssumptions
Show key assumptions, common pitfalls, and how to avoid them
- showGlossary
Show glossary of technical terms in plain language
Value
A results object containing:
results$overview | a html | ||||
results$decisionGuide | a html | ||||
results$clinicalScenarios | a html | ||||
results$assumptions | a html | ||||
results$glossary | a html |
Examples
# \donttest{
# Simply open the guide - no data needed
lassointro()
#>
#> PENALIZED COX REGRESSION GUIDE
#>
#> .lg { max-width: 780px; line-height: 1.6; }
#> .lg table { width: 100%; border-collapse: collapse; margin-bottom:
#> 16px; }
#> .lg th { padding: 8px; text-align: left; border-bottom: 2px solid
#> #333; }
#> .lg th.center { text-align: center; }
#> .lg td { padding: 8px; border-bottom: 1px solid #ccc; }
#> .lg td.center { text-align: center; }
#> .lg td.vtop, .lg th.vtop { vertical-align: top; width: 28%; }
#> .lg .callout { background: #f8f4e8; border-left: 4px solid #c9a825;
#> padding: 12px 16px; margin: 16px 0; }
#> <div class="lg">
#>
#> Penalized Cox Regression Guide
#>
#> Choosing the right method for variable selection in survival analysis.
#>
#> Who is this for? Clinicians, pathologists, radiologists, and
#> oncologists
#> who have survival data with many potential predictors and need to
#> identify which variables
#> truly matter for patient outcomes.
#>
#> <div class="callout">
#> When NOT to use variable-selection penalized regression (LASSO etc.):
#> If you have fewer than ~15 candidate predictors and an
#> events-per-variable ratio above 10
#> (e.g., 150 events with 12 variables), standard multivariable Cox
#> regression is usually better.
#> It gives you p-values, confidence intervals, and unbiased hazard
#> ratios without penalization.
#> Use the Survival → Multivariable Survival menu instead.
#>
#> Exception: If you have very few events (<20), rare outcomes, or
#> encounter
#> complete/quasi-complete separation (infinite coefficients), use Firth
#> Regression
#> even with few predictors. Firth is not for variable selection —
#> it is for bias correction.
#>
#> Available Methods (Increasing Complexity)
#>
#>
#> Method
#> Best For
#> Complexity
#> Menu Location
#>
#>
#>
#> LASSO Cox
#> First-line variable selection. Automatically drops irrelevant
#> predictors. Start here if unsure.
#> Basic
#> Penalized Cox → LASSO Cox
#>
#>
#> Adaptive LASSO Cox
#> More accurate selection when you need statistical consistency.
#> Uses data-driven weights to penalize less important variables more
#> heavily.
#> Moderate
#> Penalized Cox → Adaptive LASSO Cox
#>
#>
#> Elastic Net Cox
#> When predictors are moderately correlated.
#> Keeps groups of correlated variables together instead of picking just
#> one arbitrarily.
#> Moderate
#> Penalized Cox → Elastic Net Cox
#>
#>
#> Group LASSO Cox
#> When variables naturally form groups (e.g., grouped by genes,
#> pathways, or categories). Drops or keeps whole groups at a time.
#> Advanced
#> Penalized Cox (Drafts) → Group LASSO Cox
#>
#>
#> Sparse Group LASSO
#> Similar to Group LASSO, but can drop individual variables within a
#> selected group. Highly flexible for clustered features.
#> Advanced
#> Penalized Cox (Drafts) → Sparse Group LASSO
#>
#>
#> SCAD/MCP Cox
#> When you need unbiased coefficient estimates. Standard LASSO shrinks
#> large effects
#> toward zero; SCAD and MCP do not.
#> Advanced
#> Penalized Cox → SCAD/MCP Cox
#>
#>
#> Firth Regression
#> When you have small samples, rare events, or complete/quasi-complete
#> separation.
#> Firth’s penalized likelihood removes first-order bias without
#> variable selection.
#> Supports both logistic (binary outcome) and Cox (survival) models.
#> Basic
#> Penalized Cox → Firth Regression
#>
#>
#> PCA Cox
#> Reduces variables into linearly uncorrelated primary components.
#> Excellent for severe multicollinearity.
#> Moderate
#> Dimension Reduction Cox → PCA Cox
#>
#>
#> PLS Cox
#> When you have far more variables than patients (e.g., genomic data,
#> radiomic features).
#> Creates outcome-aware composite scores rather than just variance-based
#> components.
#> Advanced
#> Dimension Reduction Cox → PLS Cox
#>
#>
#> Rule of thumb: Start with LASSO Cox. If your predictors are highly
#> correlated,
#> switch to Elastic Net Cox. If the variables form known biological
#> groupings, use Group LASSO.
#> If you have more variables than patients and just want composite
#> dimensions, use PLS or PCA.
#> If you have very few events, rare outcomes, or separation issues, use
#> Firth Regression for bias-corrected estimates.
#> Check the Decision Guide section for a step-by-step flowchart.
#>
#> .lg { max-width: 780px; line-height: 1.6; }
#> .lg table { width: 100%; border-collapse: collapse; margin-bottom:
#> 16px; }
#> .lg th { padding: 8px; text-align: left; border-bottom: 2px solid
#> #333; }
#> .lg th.center { text-align: center; }
#> .lg td { padding: 8px; border-bottom: 1px solid #ccc; }
#> .lg td.center { text-align: center; }
#> .lg td.vtop, .lg th.vtop { vertical-align: top; width: 28%; }
#> .lg .callout { background: #f8f4e8; border-left: 4px solid #c9a825;
#> padding: 12px 16px; margin: 16px 0; }
#> <div class="lg">
#>
#> Decision Flowchart: Which Method Should I Use?
#>
#> Step 1: How many predictors vs. patients?
#>
#> Predictors < Patients (p < n) → Go to Step 2
#> Predictors ≥ Patients (p ≥ n) → Use dimension reduction
#> (PCA Cox or PLS Cox) or Elastic Net Cox
#>
#> Step 2: Are your predictors naturally grouped?
#>
#> Yes (e.g., biological pathways or categorical group clusters) →
#> Use Group LASSO or Sparse Group LASSO
#> No → Go to Step 3
#>
#> Step 3: Are your predictors strongly correlated?
#>
#> No or mild correlation (r < 0.7) → Go to Step 4
#> Moderate/Strong correlation (r ≥ 0.7) → Use Elastic Net Cox to
#> select correlated groups, or PCA Cox to shrink to orthogonal
#> components.
#>
#> Step 4: What is your primary variable selection goal?
#>
#> Identify which variables matter roughly (screening) → Use LASSO
#> Cox
#> Accurate variable selection with mathematical consistency (Oracle)
#> → Use Adaptive LASSO Cox
#> Unbiased hazard ratio estimates without shrinkage bias → Use
#> SCAD/MCP Cox
#>
#> Step 5: Event checks (The EPV Rule)
#>
#> < 10 events → Standard penalized regression is unreliable. Use
#> Firth Regression for bias-corrected estimates, or Kaplan-Meier /
#> univariate Cox.
#> 10–50 events → Use LASSO or Elastic Net with caution. If
#> complete separation is detected, switch to Firth Regression. Let the
#> module's Suitability Assessment guide you.
#> > 50 events → Any method above is statistically appropriate.
#>
#> Step 6: Is complete or quasi-complete separation an issue?
#>
#> Yes (a predictor perfectly predicts the outcome, or a category has
#> zero events) → Use Firth Regression. Standard logistic/Cox
#> regression will produce infinite coefficients.
#> No → Use the method selected above.
#>
#> Quick Comparison Table
#>
#>
#> Feature
#> <th class="center">LASSO
#> <th class="center">Adaptive
#> <th class="center">Elastic Net
#> <th class="center">Grouped
#> <th class="center">SCAD/MCP
#> <th class="center">Firth
#> <th class="center">PCA/PLS
#>
#>
#>
#> Drops variables
#> <td class="center">Yes
#> <td class="center">Yes
#> <td class="center">Yes
#> <td class="center">Yes
#> <td class="center">Yes
#> <td class="center">No
#> <td class="center">No
#>
#>
#> Handles separation
#> <td class="center">No
#> <td class="center">No
#> <td class="center">No
#> <td class="center">No
#> <td class="center">No
#> <td class="center">Yes
#> <td class="center">N/A
#>
#>
#> Handles heavy collinearity
#> <td class="center">No
#> <td class="center">No
#> <td class="center">Yes
#> <td class="center">By Group
#> <td class="center">No
#> <td class="center">No
#> <td class="center">Yes
#>
#>
#> Unbiased coefficient estimates
#> <td class="center">No
#> <td class="center">Partial
#> <td class="center">No
#> <td class="center">No
#> <td class="center">Yes
#> <td class="center">Yes
#> <td class="center">N/A
#>
#>
#> High-dimensional (p > n)
#> <td class="center">Yes
#> <td class="center">Yes
#> <td class="center">Yes
#> <td class="center">Yes
#> <td class="center">Yes
#> <td class="center">No
#> <td class="center">Yes
#>
#>
#> Logistic (binary outcome)
#> <td class="center">No
#> <td class="center">No
#> <td class="center">No
#> <td class="center">No
#> <td class="center">No
#> <td class="center">Yes
#> <td class="center">No
#>
#>
#> Oracle consistency
#> <td class="center">No
#> <td class="center">Yes
#> <td class="center">No
#> <td class="center">No
#> <td class="center">Yes
#> <td class="center">N/A
#> <td class="center">No
#>
#>
#> Suggested minimum events
#> <td class="center">~40
#> <td class="center">~60
#> <td class="center">~40
#> <td class="center">~50
#> <td class="center">~60
#> <td class="center">~5
#> <td class="center">~20
#>
# }