View source: R/Coxmos_isb_splsdrcox.R
| isb.splsdrcox_penalty | R Documentation | 
This function performs a single-block sparse partial least squares deviance residual Cox analysis (sPLS-DRCOX) using the optimal components and variables identified in a previous cross-validation process. It builds the final model based on the selected hyperparameters.
isb.splsdrcox_penalty(
  X,
  Y,
  cv.isb,
  x.center = TRUE,
  x.scale = FALSE,
  remove_near_zero_variance = TRUE,
  remove_zero_variance = TRUE,
  toKeep.zv = NULL,
  remove_non_significant = FALSE,
  alpha = 0.05,
  MIN_EPV = 5,
  returnData = TRUE,
  verbose = FALSE
)
X | 
 List of numeric matrices or data.frames. Explanatory variables. If the variables are qualitative, they must be transformed into binary variables.  | 
Y | 
 Numeric matrix or data.frame. Response variables with two columns: "time" and "event". Accepted values for the event column are 0/1 or FALSE/TRUE for censored and event observations, respectively.  | 
cv.isb | 
 Instance of class "Coxmos" and model "cv.iSB.sPLS-DRCOX-Dynamic". Used to retrieve the optimal components and variables for the sPLS Cox model.  | 
x.center | 
 Logical. If TRUE, the X matrix is centered to zero means (default: TRUE).  | 
x.scale | 
 Logical. If TRUE, the X matrix is scaled to unit variance (default: FALSE).  | 
remove_near_zero_variance | 
 Logical. If TRUE, near-zero variance variables are removed (default: TRUE).  | 
remove_zero_variance | 
 Logical. If TRUE, zero-variance variables are removed (default: TRUE).  | 
toKeep.zv | 
 Character vector. Names of variables in X to retain despite near-zero variance filtering (default: NULL).  | 
remove_non_significant | 
 Logical. If TRUE, non-significant variables/components in the final Cox model are removed through forward selection (default: FALSE).  | 
alpha | 
 Numeric. Significance threshold (default: 0.05).  | 
MIN_EPV | 
 Numeric. Minimum number of Events Per Variable (EPV) for the final Cox model. Limits the number of variables/components allowed (default: 5).  | 
returnData | 
 Logical. If TRUE, returns the original and normalized X and Y matrices (default: TRUE).  | 
verbose | 
 Logical. If TRUE, extra messages will be displayed (default: FALSE).  | 
The isb.splsdrcox_penalty function fits a single-block sPLS-DRCOX model using the input data
and the optimal components and variables determined from cross-validation. The function allows
for centering and scaling of the data, and it offers the option to remove variables with near-zero
variance, zero variance, or those that are non-significant based on a specified alpha level.
This method is particularly suited for high-dimensional data where there are many more variables than observations. The function can handle multiple blocks of data, and integrates them into a single model for Cox proportional hazards analysis.
An object of class "Coxmos" and model "isb.splsdrcox", containing:
X: List with normalized X data:
data: Normalized X matrix (or NA if not returned).
x.mean: Mean values of the X matrix.
x.sd: Standard deviations of the X matrix.
Y: List with normalized Y data:
data: Normalized Y matrix.
y.mean: Mean values of the Y matrix.
y.sd: Standard deviations of the Y matrix.
survival_model: Fitted survival model (Cox proportional hazards model).
list_spls_models: List of sPLS models computed for each block.
n.comp: Number of components selected.
n.varX: Number of variables selected per block.
call: Function call.
X_input: Original X matrix (or NA if not returned).
Y_input: Original Y matrix (or NA if not returned).
alpha: Significance threshold used.
nsv: Variables removed due to non-significance.
nzv: Variables removed due to near-zero variance.
nz_coeffvar: Variables removed due to near-zero coefficient of variation.
class: Model class.
time: Time taken to run the analysis.
data("X_multiomic")
data("Y_multiomic")
set.seed(123)
index_train <- caret::createDataPartition(Y_multiomic$event, p = .25, list = FALSE, times = 1)
X_train <- X_multiomic
X_train$mirna <- X_train$mirna[index_train,1:30]
X_train$proteomic <- X_train$proteomic[index_train,1:30]
Y_train <- Y_multiomic[index_train,]
cv <- cv.isb.splsdrcox_penalty(X_train, Y_train, max.ncomp = 1, penalty.list = c(0, 0.5),
n_run = 1, k_folds = 3)
model <- isb.splsdrcox_penalty(X_train, Y_train, cv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.