plot_observation.pseudobeta.list function

plot_observation.pseudobeta.list

plot_observation.pseudobeta.list

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

plot_observation.pseudobeta.list( lst_models, observation, error.bar = TRUE, onlySig = TRUE, alpha = 0.05, zero.rm = TRUE, txt.x.angle = 0, top = NULL, auto.limits = TRUE, show.betas = FALSE, title = NULL, title_size_text = 15, subtitle = NULL, subtitle_size_text = 12, legend.position = "right", legend_title = "Method", legend_size_text = 12, x_axis_size_text = 10, y_axis_size_text = 10, label_x_axis_size = 10, label_y_axis_size = 10, verbose = FALSE )

Arguments

  • lst_models: List of Coxmos models.
  • 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).
  • txt.x.angle: Numeric. Angle of X text (default: 0).
  • 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).
  • title: Character. Plot title (default: NULL).
  • title_size_text: Numeric. Text size for title (default: 15).
  • subtitle: Character. Plot subtitle (default: NULL).
  • subtitle_size_text: Numeric. Text size for subtitle (default: 12).
  • legend.position: Character. Legend position. Must be one of the following: "top", "bottom", "right" or "left (default: "right").
  • legend_title: Character. Legend title (default: "Method").
  • legend_size_text: Numeric. Text size for legend title (default: 12).
  • x_axis_size_text: Numeric. Text size for x axis (default: 10).
  • y_axis_size_text: Numeric. Text size for y axis (default: 10).
  • label_x_axis_size: Numeric. Text size for x label axis (default: 10).
  • label_y_axis_size: Numeric. Text size for y label axis (default: 10).
  • verbose: Logical. If verbose = TRUE, extra messages could be displayed (default: FALSE).

Returns

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.

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_penalty(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_observation.pseudobeta.list(lst_models, observation = X_test[1,,drop=FALSE])

Author(s)

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

  • Maintainer: Pedro Salguero García
  • License: CC BY 4.0
  • Last published: 2025-03-05