plot_proportionalHazard {Coxmos}R Documentation

plot_proportionalHazard

Description

Generates a visual assessment of the proportional hazards assumption for a given Coxmos model. The function integrates the capabilities of the survival::cox.zph and survminer::ggcoxzph functions to produce a ggplot2 graph that visualizes the validity of the proportional hazards assumption.

Usage

plot_proportionalHazard(model)

Arguments

model

Coxmos model.

Details

The proportional hazards assumption is a fundamental tenet of the Cox proportional hazards regression model. It posits that the hazard ratios between groups remain constant over time. Violations of this assumption can lead to biased or misleading results. Thus, assessing the validity of this assumption is crucial in survival analysis.

The function begins by validating the provided model to ensure it belongs to the Coxmos class. If the model is valid, the function then evaluates the proportional hazards assumption using the survival::cox.zph function. The results of this evaluation are then visualized using the survminer::ggcoxzph function, producing a ggplot2 graph.

The resulting plot provides a visual representation of the Schoenfeld residuals against time, allowing for an intuitive assessment of the proportional hazards assumption. Each variable or factor level from the model is represented in the plot, and the global test for the proportional hazards assumption is also provided.

This function is instrumental in ensuring the robustness and validity of survival analysis results, offering a comprehensive visualization that aids in the interpretation and validation of the Coxmos model's assumptions.

Value

A ggplot2 object visualizing the assessment of the proportional hazards assumption for the given Coxmos model. The plot displays the Schoenfeld residuals against time for each variable or factor level from the model. A line is fitted to these residuals to indicate any trend, which can suggest a violation of the proportional hazards assumption.

Author(s)

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

References

Therneau TM (2024). A Package for Survival Analysis in R. R package version 3.5-8, https://CRAN.R-project.org/package=survival. Kassambara A, Kosinski M, Biecek P (2021). survminer: Drawing Survival Curves using 'ggplot2'. R package version 0.4.9, https://CRAN.R-project.org/package=survminer. Grambsch PM, Therneau TM (1994). “Proportional hazards tests and diagnostics based on weighted residuals.” Biometrika. doi:10.1093/biomet/81.3.515, https://academic.oup.com/biomet/article-abstract/81/3/515/257037?redirectedFrom=fulltext. Schoenfeld DA (1982). “Partial residuals for the proportional hazards regression model.” Biometrika. doi:10.1093/biomet/69.1.239, https://academic.oup.com/biomet/article-abstract/69/1/239/243012?redirectedFrom=fulltext.

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)
plot_proportionalHazard(splsicox.model)

[Package Coxmos version 1.0.2 Index]