b4pst | R Documentation |
calculate survival time and censor variables before and post a time lag.
b4pst(os, osc, lag)
os |
a vector to denote the observed times |
osc |
a vector to denote censor variables |
lag |
a scalar to denote the time 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
n <- 500
event <- runif(n,1, 5)
osc<-1*(event<=4)
os <- pmin(event,4)
b4pst(os,osc,3.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.