b4pst {EventPredInCure} | R Documentation |
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)
Arguments
os |
a vector to denote the observed times |
osc |
a vector to denote censor variables |
lag |
a scalar to denote the time 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
Examples
n <- 500
event <- runif(n,1, 5)
osc<-1*(event<=4)
os <- pmin(event,4)
b4pst(os,osc,3.5)
[Package EventPredInCure version 1.0 Index]