gencens | R Documentation |
A function to generate observed times given a vector of true survival times and a vector of censoring times. Used in the simulation of survival data.
gencens(survtimes, censtimes, type = "right")
survtimes |
a vector of survival times |
censtimes |
a vector of censoring times for left or right censored data, 2-column matrix of censoring times for interval censoring (number of rows equal to the number of observations). |
type |
the type of censoring to generate can be 'right' (default), 'left' or 'interval' |
an object of class 'Surv', the censoring indicator is equal to 1 if the event is uncensored and 0 otherwise for right/left censored data, or for interval censored data, the indicator is 0 uncensored, 1 right censored, 2 left censored, or 3 interval censored.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.