plot_multipleObservations.LP: plot_multipleObservations.LP

plot_multipleObservations.LPR Documentation

plot_multipleObservations.LP

Description

Visualizes the linear predictors for multiple patients based on a given Coxmos model.

Usage

plot_multipleObservations.LP(
  model,
  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
)

Arguments

model

Coxmos model.

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).

Details

The function plot_multipleObservations.LP is designed to visualize the linear predictors for multiple patients based on the provided Coxmos model. The function takes into account various parameters to customize the visualization, such as the significance level, error bars, and the number of top variables to display.

The function works by first checking the class of the provided model. Depending on the model type, it delegates the plotting task to one of the three methods: classical models, PLS models, or multi-block PLS models. Each of these methods is tailored to handle specific model types and produce the desired plots.

Value

A ggplot object visualizing the linear predictors for multiple patients based on the provided Coxmos model.

Author(s)

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

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:50]
Y_train <- Y_proteomic[index_train,]
X_test <- X_proteomic[-index_train,1:50]
Y_test <- Y_proteomic[-index_train,]
splsicox.model <- splsicox(X_train, Y_train, n.comp = 2, penalty = 0.5, x.center = TRUE,
x.scale = TRUE)
plot_multipleObservations.LP(model = splsicox.model, observations = X_test[1:5,])

Coxmos documentation built on April 4, 2025, 12:20 a.m.