tidysurv.cr_survreg: Create a tidy-surv object for an object of class 'cr_survreg'

Description Usage Arguments Value

Description

Create a tidy-surv object for an object of class cr_survreg

Usage

1
2
3
4
## S3 method for class 'cr_survreg'
tidysurv(object, newdata = NULL, group_vars = NULL,
  time_period = NULL, id_col_name = NULL, time_dependent_vars = NULL,
  max_num_levels = 200, ...)

Arguments

object

An object of class cr_survreg

newdata

Optional. A dataframe.

group_vars

A character-vector specifying column(s) to group-by when creating the survival-curves.

time_period

This bins the time-values into groups of this width, which is needed for plotting rates and time-dependent variables.

id_col_name

Character-string of id-column. Only needed if originally supplied value doesn't work for 'newdata'

time_dependent_vars

Character-strings for time-dependent covariates. Instead of taking the overall mean, takes the mean at each time-point.

max_num_levels

If any 'group_vars' are numeric this can lead to hundreds of distinct curves (often this is uninentional). This argument ensures that you don't accidentally eat up time computing these curves when you didnt mean to. Default is 200.

...

Passed to tidysurv.formula, which in turn passes these args to survfit

Value

An object of class cr_survreg


jwdink/tidysurv documentation built on May 20, 2019, 6:24 a.m.