Dear all, I'm struggling with predicting "expected time until death" for a coxph and survreg model. I have two datasets. Dataset 1 includes a certain number of people for which I know a vector of covariates (age, gender, etc.) and their event times (i.e., I know whether they have died and when if death occurred prior to the end of the observation period). Dataset 2 includes another set of people for which I only have the covariate vector. I would like to use Dataset 1 to calibrate either a coxph or survreg model and then use this model to determine an "expected time until death" for the individuals in Dataset 2. For example, I would like to know when a person in Dataset 2 will die, given his/ her age and gender. I checked predict.coxph and predict.survreg as well as the document "A Package for Survival Analysis in S" written by Terry M. Therneau but I have to admit that I'm a bit lost here. Could anyone give me some advice on how this could be done? Thanks very much in advance, Michael Michael Haenlein Professor of Marketing ESCP Europe Paris, France [[alternative HTML version deleted]]
On Nov 11, 2010, at 3:44 AM, Michael Haenlein wrote:> Dear all, > > I'm struggling with predicting "expected time until death" for a > coxph and > survreg model. > > I have two datasets. Dataset 1 includes a certain number of people > for which > I know a vector of covariates (age, gender, etc.) and their event > times > (i.e., I know whether they have died and when if death occurred > prior to the > end of the observation period). Dataset 2 includes another set of > people for > which I only have the covariate vector. I would like to use Dataset > 1 to > calibrate either a coxph or survreg model and then use this model to > determine an "expected time until death" for the individuals in > Dataset 2. > For example, I would like to know when a person in Dataset 2 will > die, given > his/ her age and gender. > > I checked predict.coxph and predict.survreg as well as the document "A > Package for Survival Analysis in S" written by Terry M. Therneau but > I have > to admit that I'm a bit lost here.The first step would be creating a Surv-object, followed by running a regression that created a coxph-object, using dataset1 as input. So you should be looking at: ?Surv ?coxph There are worked examples in the help pages. You would then run predict() on the coxph fit with "dataset2" as the newdata argument. The default output is the linear predictor for the log-hazard relative to a mean survival estimate but other sorts of estimates are possible. The survfit function provides survival curve suitable for plotting. (You may want to inquire at a local medical school to find statisticians who have experience with this approach. This is ordinary biostatistics these days.) -- David.> > Could anyone give me some advice on how this could be done? > > Thanks very much in advance, > > Michael > > > > Michael Haenlein > Professor of Marketing > ESCP Europe > Paris, FranceDavid Winsemius, MD West Hartford, CT
Michael, You are looking to compute an estimated time to death -- rather than the odds of death conditional upon time. Thus, you will want to use "time to death" as your dependent variable rather than a dichotomous outcome ( 0=alive, 1=death). You can accomplish this with a straight forward regression analysis. Best, Jim On Thu, Nov 11, 2010 at 3:44 AM, Michael Haenlein <haenlein@escpeurope.eu>wrote:> Dear all, > > I'm struggling with predicting "expected time until death" for a coxph and > survreg model. > > I have two datasets. Dataset 1 includes a certain number of people for > which > I know a vector of covariates (age, gender, etc.) and their event times > (i.e., I know whether they have died and when if death occurred prior to > the > end of the observation period). Dataset 2 includes another set of people > for > which I only have the covariate vector. I would like to use Dataset 1 to > calibrate either a coxph or survreg model and then use this model to > determine an "expected time until death" for the individuals in Dataset 2. > For example, I would like to know when a person in Dataset 2 will die, > given > his/ her age and gender. > > I checked predict.coxph and predict.survreg as well as the document "A > Package for Survival Analysis in S" written by Terry M. Therneau but I have > to admit that I'm a bit lost here. > > Could anyone give me some advice on how this could be done? > > Thanks very much in advance, > > Michael > > > > Michael Haenlein > Professor of Marketing > ESCP Europe > Paris, France > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. >-- *James C. Whanger Research Consultant 2 Wolf Ridge Gap Ledyard, CT 06339 Phone: 860.389.0414* [[alternative HTML version deleted]]
Maybe Matching Threads
- predict.coxph
- Testing equality of coefficients in coxph model
- Time-dependent covariates in survreg function
- interpretation of coefficients in survreg AND obtaining the hazard function
- interpretation of coefficients in survreg AND obtaining the hazard function for an individual given a set of predictors