loadingplot.Coxmos {Coxmos}R Documentation

loadingplot.Coxmos

Description

The loadingplot.Coxmos function visualizes the loading values of a given Coxmos model. The function produces a series of bar plots for each component's loading values, offering a comprehensive view of the model's variable contributions. The plots can be customized to exclude zero loadings, display only the top variables, and automatically adjust the color scale limits.

Usage

loadingplot.Coxmos(model, zero.rm = TRUE, top = NULL, auto.limits = TRUE)

Arguments

model

Coxmos model.

zero.rm

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

top

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

auto.limits

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

Details

The primary objective of the loadingplot.Coxmos function is to facilitate the interpretation of Coxmos models by visualizing the loading values of each component. The function first verifies the class of the provided model to ensure it is a valid Coxmos model.

The loading values are extracted from the model and processed based on the user's specifications. If the zero.rm parameter is set to TRUE, variables with zero loadings are excluded from the visualization. Additionally, if the top parameter is specified, only the top variables, ranked by their absolute loading values, are displayed.

The function employs the 'ggplot2' framework for visualization. The color scale of the plots can be automatically adjusted based on the maximum absolute loading value when auto.limits is set to TRUE. If the RColorConesa package is available, it utilizes its color palettes for enhanced visualization; otherwise, default colors are applied.

Value

A list of ggplot2 objects, each representing the loading values for a component of the Coxmos model.

Examples

data("X_proteomic")
data("Y_proteomic")
X <- X_proteomic[,1:50]
Y <- Y_proteomic
splsicox.model <- splsicox(X, Y, n.comp = 2, penalty = 0.5, x.center = TRUE, x.scale = TRUE)
loadingplot.Coxmos(model = splsicox.model)

[Package Coxmos version 1.0.2 Index]