O'Brien's Test for Association of a Single Variable with Survival
Peter O'Brien's test for association of a single variable with survival This test is proposed in Biometrics, June 1978.
survobrien(formula, data, subset, na.action, transform)
formula |
a valid formula for a cox model. |
data |
a data.frame in which to interpret the variables named in
the |
subset |
expression indicating which subset of the rows of data should be used in the fit. All observations are included by default. |
na.action |
a missing-data filter function. This is applied to the model.frame
after any
subset argument has been used. Default is |
transform |
the transformation function to be applied at each time point. The default is O'Brien's suggestion logit(tr) where tr = (rank(x)- 1/2)/ length(x) is the rank shifted to the range 0-1 and logit(x) = log(x/(1-x)) is the logit transform. |
a new data frame. The response variables will be column names
returned by the 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.
A time-dependent cox model can now be fit to the new data. The univariate statistic, as originally proposed, is equivalent to single variable score tests from the time-dependent model. This equivalence is the rationale for using the time dependent model as a multivariate extension of the original paper.
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.
A prior version of the routine returned new time variables rather than
a strata. Unfortunately, that strategy does not work if the original
formula has a strata statement. This new data set will be the same
size, but the coxph
routine will process it slightly faster.
O'Brien, Peter, "A Nonparametric Test for Association with Censored Data", Biometrics 34: 243-250, 1978.
xx <- survobrien(Surv(futime, fustat) ~ age + factor(rx) + I(ecog.ps), data=ovarian) coxph(Surv(time, status) ~ age + strata(.strata.), data=xx)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.