--begin included message --- Dear Members, I required to score probability of survival before specified time using fitted cox model on scoring dataset. On the training sample data I am able to get the probability of a survival before time point(t), but on the scoring dataset, which will have only predictor information I am facing some issues. It would be great help for me if you tell me where am I going wrong! Here is the sample script!
------------------ Your example isn't complete: the error comes from a function predictProb.coxph() which I have never heard of, and I wrote the survival library. I obviously can't comment on why it fails -- you might want to contact the author of the function. Using only the survival library (one of the more recent versions), you need to know the fact that Pr(survival to t) = exp(-expected events by t), then you can use predict(fit_coxph, type="expected", newdata=....) where newdata has a time variable that contains the desired time point for prediction. Note, by default the coxph result does not store all of the data needed to make predicted survivals (it needs to keep the entire X matrix). You can override this by adding "model=TRUE" to the original call. If you do not, then it needs to look up the orginal data set to do the prediction. Terry Therneau ______________________________________________ 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.