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

View source: R/utilities_shrinkDSM.R

divisionpointsR Documentation

Create division points for estimation of a dynamic survival model

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

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

data("gastric")

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

shrinkDSM documentation built on Nov. 16, 2022, 1:11 a.m.