plot_squares: Plot squared errors between the outcome and observed...

View source: R/plotting.R

plot_squaresR Documentation

Plot squared errors between the outcome and observed survival.

Description

Generates a series of plots of averaged squared errors as a function of unique time points, observations, and unique values of the linear predictor scores.

Usage

plot_squares(
  cal_object,
  palette = c(reference = "gray60", model = "coral3"),
  show_reference = TRUE,
  error_stat = c("none", "se", "2se", "95perc"),
  ribbon_alpha = 0.25,
  line_width = 0.5,
  point_size = 2,
  cust_theme = ggplot2::theme_classic(),
  ...
)

Arguments

cal_object

a 'calibrator' class object.

palette

color palette.

show_reference

logical, should averaged squared errors be displayed for the reference (NULL model)? Defaults to TRUE.

error_stat

error statistic to be presented as a ribbon, defaults to none.

ribbon_alpha

alpha of the ribbon representing the requested error.

line_width

width of the lines connecting the data points.

point_size

size of the data points.

cust_theme

custom ggplot theme.

...

extra arguments, currently none.

Details

Intended for internal use. Mean values are presented as points connected with lines. Optional error region is shown as a ribbon.

Value

a list of ggplot objects.


PiotrTymoszuk/coxExtensions documentation built on Feb. 6, 2024, 10:58 p.m.