

   PPeetteerr OO''BBrriieenn''ss tteesstt ffoorr aassssoocciiaattiioonn ooff aa ssiinnggllee vvaarriiaabbllee
   wwiitthh ssuurrvviivvaall

        survobrien(formula, data)

   AArrgguummeennttss::

    formula: a valid formula for a cox model, without time
             dependent covariates.

       data: a data frame.

   VVaalluuee::

        a new data frame.  The original time and status vari-
        ables are removed, and have been replaced with `start',
        `stop', and `event'.  If a predictor variable is a fac-
        tor, it is retained as is.  Other predictor variables
        have been replaced with time-dependent logit scores.
        Because of the time dependent variables, the new data
        frame will have many more rows that the original data,
        approximately #rows * #deaths /2.

   MMEETTHHOODD::

        A time-dependent cox model can now be fit to the new
        data.  The univariate statistic, as originally pro-
        posed, 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 mul-
        tivariate 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.

   RReeffeerreenncceess::

        O'Brien, Peter, "A Nonparametric Test for Association
        with Censored Data", Biometrics 34: 243-250, 1978.

   SSeeee AAllssoo::

        `survdiff'

   EExxaammpplleess::

        xx <- survobrien(Surv(time, status) ~ age + factor(rx) + ecog.ps,
                              data=fleming)
        coxph(Surv(start, stop, event) ~ age, data=xx)
        coxph(Surv(start, stop, event) ~ age + rx + ecog.ps, data=xx)

