plot_pseudobeta_newObservation.list {Coxmos}R Documentation

plot_pseudobeta_newObservation.list

Description

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

Usage

plot_pseudobeta_newObservation.list(
  lst_models,
  new_observation,
  error.bar = TRUE,
  onlySig = TRUE,
  alpha = 0.05,
  zero.rm = TRUE,
  top = NULL,
  auto.limits = TRUE,
  show.betas = FALSE,
  verbose = FALSE
)

Arguments

lst_models

List of Coxmos models.

new_observation

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

error.bar

Logical. Show error bar (default: TRUE).

onlySig

Logical. Compute pseudobetas 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 with a pseudobeta equal to 0 (default: TRUE).

top

Numeric. Show "top" first variables with the higher pseudobetas in absolute value. If top = NULL, all variables are shown (default: NULL).

auto.limits

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

show.betas

Logical. Show original betas (default: FALSE).

verbose

Logical. If verbose = TRUE, extra messages could be displayed (default: FALSE).

Value

A list of lst_models length with a list of four elements per each model: plot: Linear prediction per variable. lp.var: Value of each linear prediction per variable. norm_observation: Observation normalized using the model information. observation: Observation used.

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)
splsdrcox.model <- splsdrcox(X_train, Y_train, n.comp = 2, penalty = 0.5, x.center = TRUE,
x.scale = TRUE)
lst_models = list("sPLSICOX" = splsicox.model, "sPLSDRCOX" = splsdrcox.model)
plot_pseudobeta_newObservation.list(lst_models, new_observation = X_test[1,,drop=FALSE])

[Package Coxmos version 1.0.2 Index]