Arguments
- df
(
data.frame
)
data set containing all analysis variables.- variables
-
(named
list
)
variable names. Details are:tte
(numeric
)
variable indicating time-to-event duration values.is_event
(logical
)
event variable.TRUE
if event,FALSE
if time to event is censored.arm
(factor
)
the treatment group variable.strat
(character
orNULL
)
variable names indicating stratification factors.
- control_surv
-
(
list
)
parameters for comparison details, specified by using the helper functioncontrol_surv_timepoint
. Some possible parameter options are:conf_level
(proportion
)
confidence level of the interval for survival rate.conf_type
(string
)
"plain" (default), "log", "log-log" for confidence interval type, see more insurvival::survfit()
. Note that the option "none" is no longer supported.
- data
(
data.frame
)
survival data as pre-processed byh_data_plot
.- xticks
(
numeric
,number
, orNULL
)
numeric vector of ticks or single number with spacing between ticks on the x axis. IfNULL
(default),labeling::extended()
is used to determine an optimal tick position on the x axis.- yval
(
string
)
value of y-axis. Options areSurvival
(default) andFailure
probability.- censor_show
(
flag
)
whether to show censored.- xlab
(
string
)
label of x-axis.- ylab
(
string
)
label of y-axis.- title
(
string
)
title for plot.- footnotes
(
string
)
footnotes for plot.- col
(
character
)
lines colors. Length of a vector should be equal to number of strata fromsurvival::survfit()
.- lty
(
numeric
)
line type. Length of a vector should be equal to number of strata fromsurvival::survfit()
.- lwd
(
numeric
)
line width. Length of a vector should be equal to number of strata fromsurvival::survfit()
.- pch
(
numeric
,string
)
value or character of points symbol to indicate censored cases.- size
(
numeric
)
size of censored point, a class ofunit
.- max_time
(
numeric
)
maximum value to show on X axis. Only data values less than or up to this threshold value will be plotted (defaults toNULL
).- font_size
(
number
)
font size to be used.- ci_ribbon
(
flag
)
draw the confidence interval around the Kaplan-Meier curve.- ggtheme
(
theme
)
a graphical theme as provided byggplot2
to control outlook of the Kaplan-Meier curve.- annot_at_risk
(
flag
)
compute and add the annotation table reporting the number of patient at risk matching the main grid of the Kaplan-Meier curve.- annot_surv_med
(
flag
)
compute and add the annotation table on the Kaplan-Meier curve estimating the median survival time per group.- annot_coxph
(
flag
)
add the annotation table from asurvival::coxph()
model.- annot_stats
(
string
)
statistics annotations to add to the plot. Options aremedian
(median survival follow-up time) andmin
(minimum survival follow-up time).- annot_stats_vlines
(
flag
)
add vertical lines corresponding to each of the statistics specified byannot_stats
. Ifannot_stats
isNULL
no lines will be added.- control_coxph_pw
-
(
list
)
parameters for comparison details, specified by using the helper functioncontrol_coxph()
. Some possible parameter options are:pval_method
(string
)
p-value method for testing hazard ratio = 1. Default method is "log-rank", can also be set to "wald" or "likelihood".ties
(string
)
method for tie handling. Default is "efron", can also be set to "breslow" or "exact". See more insurvival::coxph()
conf_level
(proportion
)
confidence level of the interval for HR.
- position_coxph
(
numeric
)
x and y positions for plottingsurvival::coxph()
model.- position_surv_med
(
numeric
)
x and y positions for plotting annotation table estimating median survival time per group.