s-news
[Top] [All Lists]

Re: Survival duration predictions

To: George Fraser <gfraser1@staffmail.ed.ac.uk>
Subject: Re: Survival duration predictions
From: Frank E Harrell Jr <f.harrell@vanderbilt.edu>
Date: Mon, 31 Jan 2005 10:36:21 -0600
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <1107184902.3441.13.camel@localhost.localdomain>
References: <1107184902.3441.13.camel@localhost.localdomain>
User-agent: Mozilla Thunderbird 0.9 (X11/20041124)
George Fraser wrote:
Hi,

I've generated a cox model, but I'm struggling to work out how to output
predictions based on the model I've made.

my.model<-coxph(Surv(duration,status) ~ gender + var1 + var2,
data=mydata)

My test data set looks something like this:

id,duration,gender,var1,var2 a, 65, m, 1, 3 b, 34, f, 1, 5 ...

For each id, I would like to output a predicted duration based on the
cox model so that I can compare it with other models.

I've looked at the coxph documentation, but I can only see how to output
survival probabilities. I'm probably missing something obvious, but
trawling the mail archives has been fruitless, any suggestions?

Cheers, George

Look at the Design library and its functions cph, Quantile, Mean.

--
Frank E Harrell Jr   Professor and Chair           School of Medicine
                     Department of Biostatistics   Vanderbilt University

<Prev in Thread] Current Thread [Next in Thread>