Fwindow: Calculate dynamic "death within window" curve

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Fwindow.R

Description

Calculate dynamic "death within window" curve, in other words, one minus fixed width conditional survival curves, defined as P(T<=t+w|T>t), for a fixed window width w.

Usage

1
Fwindow(object, width, variance = TRUE, conf.level = 0.95)

Arguments

object

survfit object, use type="aalen"

width

Width of the window

variance

Boolean (default=TRUE); should pointwise confidence interval of the probabilities be calculated?

conf.level

The confidence level, between 0 and 1 (default=0.95)

Details

"Die within window function" with window w, Fw(t) = P(T<=t+w|T>t), evaluated at all time points t where the estimate changes value, and associated pointwise confidence intervals (if variance=TRUE).

Both estimate and pointwise lower and upper confidence intervals are based on the negative exponential of the Nelson-Aalen estimate of the cumulative hazard, so P(T<=t+w|T>t) is estimated as exp(- int_t^t+w hatH_NA(s) ds), with hatH_NA the non-parametric Nelson-Aalen estimate.

Note: in object, no event time points at or below zero allowed

Value

A data frame with columns

time

The time points t at which Fw(t) changes value (either t or t+width is an event time point)

Fw

The Fw(t) function

low

Lower end of confidence interval

up

Upper end of confidence interval

and with attribute "width" as given as input.

Author(s)

Hein Putter H.Putter@lumc.nl

References

van Houwelingen HC, Putter H (2012). Dynamic Prediction in Clinical Survival Analysis. Chapman & Hall.

Examples

1
2
3
4
data(wbc1)
c0 <- coxph(Surv(tyears, d) ~ 1, data = wbc1, method="breslow")
sf0 <- survfit(c0)
Fw <- Fwindow(sf0,4)

Example output

Loading required package: survival

dynpred documentation built on May 2, 2019, 5:07 a.m.