survobrien(formula, data, subset, na.action, transform)
formula
, or in the subset
and the weights
argument.options()$na.action
.Surv
function, i.e., "time" and "status" for
simple survival data, or "start", "stop", "status" for counting
process data. Each individual event time is identified by the
value of the variable .strata.
. Other variables retain
their original names. If a
predictor variable is a factor or is protected with I()
, it is
retained as is. Other predictor variables have been replaced with
time-dependent logit scores. The new data frame will have many more rows that the original data, approximately the original number of rows * number of deaths/2.
In O'Brien's method, the x variables are re-ranked at each death time. A simpler method, proposed by Prentice, ranks the data only once at the start. The results are usually similar.
survdiff
xx <- survobrien(Surv(futime, fustat) ~ age + factor(rx) + I(ecog.ps),
data=ovarian)
coxph(Surv(time, status) ~ age + strata(.strata.), data=xx)
Run the code above in your browser using DataLab