powered by
calculate survival time and censor variables before and post a time lag.
b4pst(os, osc, lag)
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
a vector to denote the observed times
a vector to denote censor variables
a scalar to denote the time lag
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