Learn R Programming

Coxmos (version 1.1.2)

plot_multipleObservations.LP.list: plot_multipleObservations.LP.list

Description

Run the function "plot_multipleObservations.LP" for a list of models. More information in "?plot_multipleObservations.LP".

Usage

plot_multipleObservations.LP.list(
  lst_models,
  observations,
  error.bar = FALSE,
  onlySig = TRUE,
  alpha = 0.05,
  zero.rm = TRUE,
  txt.x.angle = 0,
  title = NULL,
  subtitle = NULL,
  legend.position = "bottom",
  auto.limits = TRUE,
  top = NULL
)

Value

A list of ggplot objects for each model in the lst_models. Each plot visualizes the linear predictor values for multiple patients based on the specified Coxmos model. The plots can optionally display error bars, consider only significant components, and can be limited to a specified number of top variables. The visualization aids in understanding the influence of explanatory variables on the survival prediction for each patient in the context of the provided models.

Arguments

lst_models

List of Coxmos models.

observations

Numeric matrix or data.frame. New explanatory variables (raw data). Qualitative variables must be transform into binary variables.

error.bar

Logical. Show error bar (default: FALSE).

onlySig

Logical. Compute plot using only significant components (default: TRUE).

alpha

Numeric. Numerical values are regarded as significant if they fall below the threshold (default: 0.05).

zero.rm

Logical. Remove variables equal to 0 (default: TRUE).

txt.x.angle

Numeric. Angle of X text (default: 0).

title

Character. Plot title (default: NULL).

subtitle

Character. Plot subtitle (default: NULL).

legend.position

Character. Legend position. Must be one of the following: "top", "bottom", "right" or "left (default: "bottom").

auto.limits

Logical. If "auto.limits" = TRUE, limits are detected automatically (default: TRUE).

top

Numeric. Show "top" first variables. If top = NULL, all variables are shown (default: NULL).

Author

Pedro Salguero Garcia. Maintainer: pedsalga@upv.edu.es

Examples

Run this code
data("X_proteomic")
data("Y_proteomic")
set.seed(123)
index_train <- caret::createDataPartition(Y_proteomic$event, p = .4, list = FALSE, times = 1)
X_train <- X_proteomic[index_train,1:30]
Y_train <- Y_proteomic[index_train,]
X_test <- X_proteomic[-index_train,1:30]
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_penalty(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)
plot_multipleObservations.LP.list(lst_models = lst_models, X_test[1:5,])

Run the code above in your browser using DataLab