Shi, Tao
2010-Nov-19 17:32 UTC
[R] calculating martingale residual on new data using "predict.coxph"
Hi list, I was trying to use "predict.coxph" to calculate martingale residuals on a test data, however, as pointed out before 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
2010-Nov-19 17:50 UTC
[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 beforeWhat 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! > > ...TaoDavid Winsemius, MD West Hartford, CT
Terry Therneau
2010-Nov-22 14:11 UTC
[R] calculating martingale residual on new data using "predict.coxph"
This feature has been added in survival 2.36-1, which is now on CRAN. (2.36-2 should appear in another day or so) Terry T. ---------begin included message -------- I was trying to use "predict.coxph" to calculate martingale residuals on a test data, however, as pointed out before http://tolstoy.newcastle.edu.au/R/e4/help/08/06/13508.html predict(mycox1, newdata, type="expected") is not implemented yet.
Shi, Tao
2010-Nov-23 01:33 UTC
[R] calculating martingale residual on new data using "predict.coxph"
Thank you, Terry! ----- Original Message ----> From: Terry Therneau <therneau at mayo.edu> > 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: Mon, November 22, 2010 6:11:15 AM > Subject: Re: calculating martingale residual on new data using"predict.coxph"> > This feature has been added in survival 2.36-1, which is now on CRAN. > (2.36-2 should appear in another day or so) > Terry T. > > ---------begin included message -------- > I was trying to use "predict.coxph" to calculate martingale residuals on > a test > data, however, as pointed out before > > http://tolstoy.newcastle.edu.au/R/e4/help/08/06/13508.html > > predict(mycox1, newdata, type="expected") is not implemented yet. > >
Thank you for the advice, Frank! ...Tao ----- Original Message ----> From: Frank Harrell <f.harrell at vanderbilt.edu> > To: r-help at r-project.org > Sent: Sun, November 21, 2010 5:49:36 AM > Subject: Re: [R] calculating martingale residual on new data using > > > The tendency is to use residual-like diagnostics on the entire dataset that > was available for model development. For test data we typically run > predictive accuracy analyses. For example, one of the strongest validations > is to show, in a high-resolution calibration plot, that absolute predictions > (e.g., probability of survival at 2 years) are accurate. > > Frank > > > ----- > Frank Harrell > Department of Biostatistics, Vanderbilt University > -- > View this message in context: >http://r.789695.n4.nabble.com/calculating-martingale-residual-on-new-data-using-predict-coxph-tp3050712p3052377.html > > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >