0
$\begingroup$

I just fitted a boosted regression coxph model:

cox=gbm(Surv(periods, event) ~ grade + fico_range_low + revol_util + dti, data=notes)

However, I want to obtain the survival curve from the model similar to the survfit() function in the survival package. Does anyone know how to obtain using the model from the gbm package?

$\endgroup$
7
  • $\begingroup$ What made you choose to do boosting? You don't have many variables so ordinary maximum likelihood estimation is likely to work fine. $\endgroup$ Commented Jan 27, 2014 at 22:15
  • $\begingroup$ I actually have many variables, i just put a few here to show a sample. I am a newbie, so my thought regarding gbm is what I think is its ability to handle missing values without imputation. I am worried about imputation bias as my data has many predictors with NAs. Is this a correct assumption? $\endgroup$ Commented Jan 27, 2014 at 22:29
  • $\begingroup$ It depends on the method gbm uses for imputation. What does it do? And note that multiple imputation with many NAs and using ordinary modeling does not necessarily create a bias. $\endgroup$ Commented Jan 27, 2014 at 23:09
  • $\begingroup$ Thank you. I have looked into multiple imputation. However, I can t seem to figure out how to impute on new data. It seems that the packages just impute a single data set. I am looking for a way to impute a training set and use the same imputation on test data. Any suggestions? $\endgroup$ Commented Jan 27, 2014 at 23:31
  • $\begingroup$ By "impute on new data" I assume you mean "obtain predictions on new incomplete data". That would seem to be a problem for both approaches, and learning how gbm does multiple imputation. $\endgroup$ Commented Jan 27, 2014 at 23:56

1 Answer 1

1
$\begingroup$

Since package gbm requires package survival and can use the Surv() function in the canonical formula interface, and there is also a reference to survfit() in the basehaz.gbm() documentation in the gbm vignette, it might be possible to pull out what you're looking for using the gbm model object. I doubt it, though, based on what I've read so far.

So you might have to go to the source code and make your own function to extract or reconstruct what you need to mimic plot(survfit()). See also the (hidden) helper function reconstructGBMdata().

I also wanted to comment on using gradient boosting models, specifically for handling missing values. The short answer here is that the gbm algorithm handles missing values explicitly, obviating the need for user-handled imputation. I suggest looking up package rpart if you want to understand the technical details better.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.