Surv_3Date {ThomasJeffersonUniv} | R Documentation |
Create Surv Object using Three Dates
Description
Create right-censored Surv object using start, stop and censoring dates.
Usage
Surv_3Date(start, stop, censor, units = "years", ...)
Arguments
start , stop , censor |
|
units |
(optional) character scalar, time units |
... |
potential parameters, currently not in use |
Value
Function Surv_3Date returns a Surv object.
Examples
library(survival)
d1 = within(survival::udca, expr = {
edp_yr = Surv_3Date(entry.dt, death.dt, last.dt, units = 'years')
edp_mon = Surv_3Date(entry.dt, death.dt, last.dt, units = 'months')
})
head(d1)
noout = within(survival::udca, expr = {
edp_bug = Surv_3Date(entry.dt, death.dt, as.Date('1991-01-01'), units = 'months')
})
subset(survival::udca, subset = entry.dt > as.Date('1991-01-01')) # check error as suggested
[Package ThomasJeffersonUniv version 0.1.3 Index]