censor_date | R Documentation |
Calculate date of censoring using date of diagnosis and last follow-up.
censor_date(date_dx, date_lfu, cutoff_yr)
date_dx |
date of diagnosis |
date_lfu |
date of last follow-up |
cutoff_yr |
number of years to cutoff at |
The cutoff date is cutoff_yr
years after the date of diagnosis, on December
31st. If the cutoff date is earlier than the date of last follow-up, then the
cutoff date is the new date of censoring, otherwise use the date of last
follow-up.
date of censoring
Derek Chiu
date_dx <- as.Date("2003-03-08")
date_lfu <- as.Date("2009-08-09")
censor_date(date_dx, date_lfu, 5)
censor_date(date_dx, date_lfu, 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.