plot_proportionalHazard | R Documentation |
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.
plot_proportionalHazard(model)
model |
Coxmos model. |
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.
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.
Pedro Salguero Garcia. Maintainer: pedsalga@upv.edu.es
survival_packageCoxmos \insertRefsurvminer_packageCoxmos \insertRefGrambsch_1994Coxmos \insertRefSchoenfeld_1982Coxmos
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.