This function performs a single-block sparse partial least squares deviance residual Cox analysis (sPLS-ICOX) using the optimal components and variables identified in a previous cross-validation process. It builds the final model based on the selected hyperparameters.
isb.splsicox(
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
)
An object of class "Coxmos" and model "isb.splsicox", 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.
List of numeric matrices or data.frames. Explanatory variables. If the variables are qualitative, they must be transformed into binary variables.
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.
Instance of class "Coxmos" and model "cv.iSB.sPLS-ICOX-Dynamic". Used to retrieve the optimal components and variables for the sPLS Cox model.
Logical. If TRUE, the X matrix is centered to zero means (default: TRUE).
Logical. If TRUE, the X matrix is scaled to unit variance (default: FALSE).
Logical. If TRUE, near-zero variance variables are removed (default: TRUE).
Logical. If TRUE, zero-variance variables are removed (default: TRUE).
Character vector. Names of variables in X to retain despite near-zero variance filtering (default: NULL).
Logical. If TRUE, non-significant variables/components in the final Cox model are removed through forward selection (default: FALSE).
Numeric. Significance threshold (default: 0.05).
Numeric. Minimum number of Events Per Variable (EPV) for the final Cox model. Limits the number of variables/components allowed (default: 5).
Logical. If TRUE, returns the original and normalized X and Y matrices (default: TRUE).
Logical. If TRUE, extra messages will be displayed (default: FALSE).
The isb.splsicox
function fits a single-block sPLS-ICOX 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.
data("X_multiomic")
data("Y_multiomic")
X_multiomic$mirna <- X_multiomic$mirna[1:50,1:20]
X_multiomic$proteomic <- X_multiomic$proteomic[1:50,1:20]
Y_multiomic <- Y_multiomic[1:50,]
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,]
X_train$proteomic <- X_train$proteomic[index_train,]
Y_train <- Y_multiomic[index_train,]
cv <- cv.isb.splsicox(X_train, Y_train, max.ncomp = 1, n_run = 1, k_folds = 3,
penalty.list = c(0, 0.5))
model <- isb.splsicox(X_train, Y_train, cv)
Run the code above in your browser using DataLab