survfit0

0th

Percentile

Convert the format of a survfit object.

Add the point for a starting time (time 0) to a survfit object's elements. This is useful for plotting.

Keywords
survival
Usage
survfit0(x, start.time=0)
Arguments
x

a survfit object

start.time

the desired starting time; see details below.

Details

Survival curves are traditionally plotted forward from time 0, but since the true starting time is not known as a part of the data, the survfit routine does not include a time 0 value in the resulting object. Someone might look at cumulative mortgage defaults versus calendar year, for instance, with the `time' value a Date object. The plotted curve probably should not start at 0 = 1970/01/01. (One could certainly argue that this behavior is overly pedantic, but the decision was made over 20 years ago and it is far too late to change it now.)

This is a utility function used by plot.survfit and summary.survfit. If the original survfit call included a start.time argument then that will be used as the starting point, otherwise the default is 0. It may be useful to others, so was exported.

Value

a reformulated version of the object with an initial data point at start.time added. The time, surv, pstate, cumhaz, std.err, and std.cumhaz components will all be aliged, so as to make plots and summaries easier to produce.

Aliases
  • survfit0
Documentation reproduced from package survival, version 3.1-8, License: LGPL (>= 2)

Community examples

Looks like there are no examples yet.