R/plot_model_diagnostics_survival.R
plot.model_diagnostics_survival.Rd
This function plots objects of class "model_diagnostics_survival"
created
using the model_diagnostics()
function.
# S3 method for model_diagnostics_survival
plot(
x,
...,
plot_type = "deviance",
xvariable = "index",
smooth = as.logical(xvariable != "index"),
facet_ncol = NULL,
title = "Model diagnostics",
subtitle = "default",
colors = NULL
)
an object of class model_diagnostics_survival
to be plotted
additional objects of class model_diagnostics_survival
to be plotted together
character, either "deviance"
, "martingale"
or "Cox-Snell"
. Selects the type of plot to be prepared. If "deviance"
or "martingale
then deviance/martingale residuals are plotted against xvariable
. If "Cox-Snell"
then diagnostic plot of Cox-Snell residuals is prepared, which is CHF estimated based on Cox-Snell residuals against theoretical cumulative hazard trajectory of the Exp(1) -- diagonal line.
character, name of the variable to be plotted on x-axis (can be name of the variable to be drawn on the x-axis (can be any column from the x$result
: explanatory variable, time, other residuals). By default "index"
which gives the order of observations.
logical, shall the smooth line be added. Only used when plot_type = "deviance"
or plot_type = "martingale"
.
number of columns for arranging subplots
character, title of the plot
character, subtitle of the plot, "default"
automatically generates "created for XXX, YYY models", where XXX and YYY are the explainer labels
character vector containing the colors to be used for plotting (containing either hex codes "#FF69B4", or names "blue").
An object of the class ggplot
.