Learn R Programming

EventPredInCure (version 1.0)

b4pst: Function to calculate survival time and censor variables before and post a time lag (delay treatment effect time)

Description

calculate survival time and censor variables before and post a time lag.

Usage

b4pst(os, osc, lag)

Value

A list including the following variables:

  • b4os: overall survival time before the time lag

  • b4osc: censor variable before the time lag

  • pstos: overall survival time post the time lag

  • pstosc: censor variable post the time log lag

Arguments

os

a vector to denote the observed times

osc

a vector to denote censor variables

lag

a scalar to denote the time lag

Examples

Run this code
n <- 500
event <- runif(n,1, 5)
osc<-1*(event<=4)
os <- pmin(event,4)
b4pst(os,osc,3.5)

Run the code above in your browser using DataLab