Lasso-Cox Regression for Variable Selection in Survival Analysis
Source:R/lassocox.b.R
lassocoxClass.Rd
Performs Lasso-penalized Cox proportional hazards regression for variable selection in survival analysis. This function uses penalized likelihood to identify the most important predictors while preventing overfitting, making it ideal for high-dimensional survival data where the number of potential predictors may approach or exceed the sample size.
Details
The Lasso-Cox regression combines the Cox proportional hazards model with L1 regularization (Lasso penalty) to perform automatic variable selection. The method minimizes the partial likelihood penalized by the L1 norm of the coefficient vector, effectively shrinking less important coefficients toward zero and setting some exactly to zero.
Key features:
Automatic variable selection through L1 regularization
Cross-validation for optimal tuning parameter selection
Risk score calculation and stratification
Comprehensive model performance evaluation
Survival curve visualization by risk groups
The function uses the glmnet package for efficient computation and supports both lambda.min (minimum cross-validation error) and lambda.1se (1 standard error rule) for tuning parameter selection.
Super classes
jmvcore::Analysis
-> ClinicoPath::lassocoxBase
-> lassocoxClass
Methods
Inherited methods
jmvcore::Analysis$.createImage()
jmvcore::Analysis$.createImages()
jmvcore::Analysis$.createPlotObject()
jmvcore::Analysis$.load()
jmvcore::Analysis$.render()
jmvcore::Analysis$.save()
jmvcore::Analysis$.savePart()
jmvcore::Analysis$.setCheckpoint()
jmvcore::Analysis$.setParent()
jmvcore::Analysis$.setReadDatasetHeaderSource()
jmvcore::Analysis$.setReadDatasetSource()
jmvcore::Analysis$.setResourcesPathSource()
jmvcore::Analysis$.setStatePathSource()
jmvcore::Analysis$addAddon()
jmvcore::Analysis$asProtoBuf()
jmvcore::Analysis$asSource()
jmvcore::Analysis$check()
jmvcore::Analysis$init()
jmvcore::Analysis$optionsChangedHandler()
jmvcore::Analysis$postInit()
jmvcore::Analysis$print()
jmvcore::Analysis$readDataset()
jmvcore::Analysis$run()
jmvcore::Analysis$serialize()
jmvcore::Analysis$setError()
jmvcore::Analysis$setStatus()
jmvcore::Analysis$translate()
ClinicoPath::lassocoxBase$initialize()
Examples
if (FALSE) { # \dontrun{
# Basic Lasso-Cox regression
result <- lassocox(
data = survival_data,
elapsedtime = "time",
outcome = "status",
outcomeLevel = "1",
explanatory = c("age", "gender", "stage", "grade"),
lambda = "lambda.1se",
nfolds = 10
)
# High-dimensional scenario
result <- lassocox(
data = genomic_data,
elapsedtime = "survival_time",
outcome = "event",
outcomeLevel = "death",
explanatory = gene_variables,
lambda = "lambda.min",
nfolds = 5,
standardize = TRUE
)
} # }