plot_fit_data: Plot fit data

Description Usage Arguments Value

View source: R/survival_fit_output.R

Description

Plot fit data

Usage

1
2
3
4
5
plot_fit_data(data_to_plot, plot_type = c("survival", "cumulative hazard",
  "log cumulative hazard"), plot_groups = NULL, groups = "dist",
  scale_time = 1, time_label = "time", max_scaled_time = Inf,
  title = NULL, x_axis_gap, legend_loc = "right", logy = NULL,
  km_width = 1.25, label_size = 1.25, silence_warnings = FALSE)

Arguments

data_to_plot

a data frame from prepare_plot_data_from_fit_tibble()

plot_type

survival or cumulative hazard

plot_groups

which groups should be included in the plot. If NULL, all distributions in the data are included.

groups

column name to use for grouping.

scale_time

times are multiplied by this. So if your fit was done on a time scale of days, and you want to plot by weeks, set this to 1/7.

time_label

the x axis label

max_scaled_time

maximum time, after scaling by scale_time

title

for the plot

x_axis_gap

distance between breaks on the x axis

legend_loc

location for legend - "top", "bottom", "left", or "right"

logy

should the y axis be on the logarithmic scale? By default, it is TRUE for survival curves and FALSE for cumulative hazard.

km_width

width for the Kaplan-Meier curve line; approximately 0.5 seems to be the standard width for lines

label_size

relative multiplier for label size.

silence_warnings

suppresses certain warnings

Value

a ggplot2 plot object


MattWiener/heemodFits documentation built on May 19, 2019, 8:21 a.m.