[R] calculating martingale residual on new data using "predict.coxph"

Shi, Tao shidaxia at yahoo.com
Fri Nov 19 19:48:50 CET 2010


Hi David,

Thank you for the quick reply!   

resid(fit) only gives the residuals on the training data not on test data.

...Tao




----- Original Message ----
> From: David Winsemius <dwinsemius at comcast.net>
> To: "Shi, Tao" <shidaxia at yahoo.com>
> Cc: r-help at r-project.org; dieter.menne at menne-biomed.de; r_tingley at hotmail.com
> Sent: Fri, November 19, 2010 9:50:06 AM
> Subject: Re: [R] calculating martingale residual on new data using 
>"predict.coxph"
> 
> 
> On Nov 19, 2010, at 12:32 PM, Shi, Tao wrote:
> 
> > Hi list,
> > 
> > I was trying to use "predict.coxph" to calculate martingale residuals  on a 
>test
> > data, however, as pointed out before
> 
> What about  resid(fit) ?  It's my reading of Therneau & Gramsch [and of  
>help(coxph.object) ] that they consider those martingale residuals.
> 
> > 
> > http://tolstoy.newcastle.edu.au/R/e4/help/08/06/13508.html
> > 
> > predict(mycox1, newdata, type="expected") is not implemented yet.   Dieter
> > suggested to use 'cph' and 'predict.Design', but from my reading  so far, I'm 
>not
> > sure they can do that.
> > 
> > Do you other  ways to calculate martingale residuals on a new data?
> > 
> > Thank you  very much!
> > 
> > ...Tao
> 
> 
> David Winsemius, MD
> West  Hartford, CT
> 
>



More information about the R-help mailing list