| er_style_tte_model | R Documentation |
Builder functions for the model layer (er_tte_add_model()),
drawing a fitted parametric S(t) curve with an optional uncertainty
band.
er_style_tte_model_line(
data,
config,
stratify,
time,
strata,
theme,
show_ci = TRUE,
ribbon_alpha = 0.15,
linewidth = 1,
...
)
data |
The original data frame ( |
config |
Configuration for the model layer (populated by
|
stratify |
Logical: whether the fit is stratified
( |
time |
|
strata |
|
theme |
|
show_ci |
Whether to draw the confidence band. Default |
ribbon_alpha |
Transparency of the confidence band ( |
linewidth |
Width of the curve's line. Default |
... |
Additional named arguments forwarded from
|
See er_style_tte() for the shared interface every TTE-grammar
builder implements.
Unlike er_style_tte_curve_km()'s Kaplan-Meier step curve,
config$predictions is a smooth prediction grid (one row per
newdata row x config$time_grid value), so er_style_tte_model_line()
draws an ordinary ggplot2::geom_line()/ggplot2::geom_ribbon() pair
rather than a step function.
Stratified colour/fill both map to config$predictions's own strata
column (named after strata$var) rather than a fixed name – unlike
er_style_tte_curve_km(), which always reads a column literally
named strata (the tidied Kaplan-Meier table's own naming).
er_tte_build() still retitles the resulting legend with
strata$label afterwards.
er_style_tte_model_line() is tagged er_style_tag(fn, layer = "tte_model") – distinct from er_plot_add_model()'s own "model"
tag, since the two grammars' model builders share no signature or
config contents – so er_tte_add_model() errors informatively if
handed a builder tagged for a different layer (including
er_plot_add_model()'s own builders).
A geom, or a list of geoms.
er_tte_add_model(), er_style_tte_curve_km(), er_style_tte()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.