View source: R/Coxmos_isb_splsdacox_dynamic.R
isb.splsdacox | R Documentation |
This function performs a single-block sparse partial least squares deviance residual Cox analysis (sPLS-DACOX) using the optimal components and variables identified in a previous cross-validation process. It builds the final model based on the selected hyperparameters.
isb.splsdacox(
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-DACOX-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.splsdacox_dynamic
function fits a single-block sPLS-DACOX 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.splsdacox_dynamic", 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:15]
X_train$proteomic <- X_train$proteomic[index_train,1:15]
Y_train <- Y_multiomic[index_train,]
vector <- list()
vector$mirna <- c(10, 15)
vector$proteomic <- c(10, 15)
cv <- cv.isb.splsdacox(X_train, Y_train, max.ncomp = 1, vector = vector, n_run = 1, k_folds = 2)
model <- isb.splsdacox(X_train, Y_train, cv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.