getAutoKM.list {Coxmos} | R Documentation |
getAutoKM.list
Description
Run the function "getAutoKM" for a list of models. More information in "?getAutoKM".
Usage
getAutoKM.list(
type = "LP",
lst_models,
comp = 1:2,
top = NULL,
ori_data = TRUE,
BREAKTIME = NULL,
n.breaks = 20,
only_sig = FALSE,
alpha = 0.05,
title = NULL,
verbose = FALSE
)
Arguments
type |
Character. Kaplan Meier for complete model linear predictor ("LP"), for PLS components ("COMP") or for original variables ("VAR") (default: LP). |
lst_models |
List of Coxmos models. |
comp |
Numeric vector. Vector of length two. Select which components to plot (default: c(1,2)). |
top |
Numeric. Show "top" first variables. If top = NULL, all variables are shown (default: 10). |
ori_data |
Logical. Compute the Kaplan-Meier plot with the raw-data or the normalize-data to compute the best cut-point for splitting the data into two groups. Only used when type = "VAR" (default: TRUE). |
BREAKTIME |
Numeric. Size of time to split the data into "total_time / BREAKTIME + 1" points. If BREAKTIME = NULL, "n.breaks" is used (default: NULL). |
n.breaks |
Numeric. If BREAKTIME is NULL, "n.breaks" is the number of time-break points to compute (default: 20). |
only_sig |
Logical. If "only_sig" = TRUE, then only significant log-rank test variables are returned (default: FALSE). |
alpha |
Numeric. Numerical values are regarded as significant if they fall below the threshold (default: 0.05). |
title |
Character. Kaplan-Meier plot title (default: NULL). |
verbose |
Logical. If verbose = TRUE, extra messages could be displayed (default: FALSE). |
Value
A list of two elements per each model in the list:
info_logrank_num
: A list of two data.frames with the numerical variables categorize as
qualitative and the cutpoint to divide the data into two groups.
LST_PLOTS
: A list with the Kaplan-Meier Plots.
Author(s)
Pedro Salguero Garcia. Maintainer: pedsalga@upv.edu.es
References
Kaplan EL, Kaplan EL, Meier P (1958). “Nonparametric Estimation from Incomplete Observations.” Journal of the American Statistical Association. doi:10.1007/978-1-4612-4380-9_25, https://link.springer.com/chapter/10.1007/978-1-4612-4380-9_25.
Examples
data("X_proteomic")
data("Y_proteomic")
set.seed(123)
index_train <- caret::createDataPartition(Y_proteomic$event, p = .5, list = FALSE, times = 1)
X_train <- X_proteomic[index_train,1:20]
Y_train <- Y_proteomic[index_train,]
X_test <- X_proteomic[-index_train,1:20]
Y_test <- Y_proteomic[-index_train,]
splsicox.model <- splsicox(X_train, Y_train, n.comp = 1, penalty = 0.5, x.center = TRUE,
x.scale = TRUE)
splsdrcox.model <- splsdrcox(X_train, Y_train, n.comp = 1, penalty = 0.5, x.center = TRUE,
x.scale = TRUE)
lst_models = list("sPLSICOX" = splsicox.model, "sPLSDRCOX" = splsdrcox.model)
getAutoKM.list(type = "LP", lst_models)