R/DStree.predict.R

Defines functions predict.DStree

Documented in predict.DStree

#'@export
predict.DStree <- function(object,data,...){
  
  fitr<-object
  class(fitr)<-"rpart"
  pred <- predict(fitr,data,type="matrix")
  col<-ncol(pred)/2
  return(list(MedSurv=predict(fitr,data,type="vector"),
          Haz=pred[,1:col],Surv=pred[,(col+1):(2*col)]))
  
}

Try the DStree package in your browser

Any scripts or data that you put into this service are public.

DStree documentation built on May 2, 2019, 3:37 p.m.