[R] Calculate survival function for AFT model
David Winsemius
dwinsemius at comcast.net
Sat Dec 31 03:42:33 CET 2011
On Dec 30, 2011, at 6:19 PM, Milan Bouchet-Valat wrote:
> Le vendredi 30 décembre 2011 à 12:46 -0800, thebennjammin a écrit :
>> I have fit an accelerated failure time model using coxph, and have
>> what seems
>> to be a simple question that I can't figure out.
> Please specify the exact package, functions and actual code you use.
> coxph(), as the name says, runs a Cox *proportional hazards* model,
> which is different from an accelerated failure time model.
I had the same puzzlement. I do think it is possible to construct some
AFT models with survival::coxph using time in the rhs of the formula,
but I do not think it is the recommended way, and I would feel much
more comfortable using survreg as well.
> You should
> use survreg (package survival) if you want to run the later family.
>
>> Given a vector of predictor values X, the survival time S[t|X] is the
>> probability the entity will survive longer than some time t. Now,
>> how do I
>> calculate this for a specific value of t?
> Package rms offers convenience functions to compute and plot this. See
> psm() and predict.psm().
In package survival the survfit function is the way to go if you want
to recover S(t|X)
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list