divisionpoints: Create division points for estimation of a dynamic survival...

Description Usage Arguments Value Author(s) Examples

View source: R/utilities_shrinkDSM.R

Description

Create a vector of division points for the model. These points mark the times at which the parameters are allowed to evolve, with the parameters being fixed between division points. The points are generated in a data driven fashion, with a new point being created when events number of interesting events have been observed since the last division point.

Usage

1
divisionpoints(times, delta, events = 1)

Arguments

times

A vector of real, positive numbers indicating the survival times. For right censored data, this is the follow up time.

delta

A vector of status indicators, with 0 = alive and 1 = dead. Other choices are TRUE/FALSE (TRUE = death) or 1/2 (2 = death).

events

A positive integer indicating the number of interesting events per interval until a new division is created.

Value

Returns an integer vector of time points to be used as division points S in shrinkDSM.

Author(s)

Daniel Winkler daniel.winkler@wu.ac.at

Examples

1
2
3
4
data("gastric")

# Create intervals for piecewise exponential model
intervals <- divisionpoints(gastric$time, gastric$status, 2)

shrinkDSM documentation built on Sept. 6, 2021, 9:07 a.m.