plot_multipleObservations.LP | R Documentation |
Visualizes the linear predictors for multiple patients based on a given Coxmos model.
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
)
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). |
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.
A ggplot object visualizing the linear predictors for multiple patients based on the provided Coxmos model.
Pedro Salguero Garcia. Maintainer: pedsalga@upv.edu.es
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,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.