0

I do not understand what the newdata argument means. Can someone explain this to me please? I have read the documentation but honestly I just can't understand it. When do I need to use it?

user798719
  • 9,619
  • 25
  • 84
  • 123

1 Answers1

0

Presumably this is reference to a predict function? You need to use 'newdata' when you want to predict an outcome for a combination of predictor variables that are not in your dataset. You need to supply a list object with column names that match the RHS variables. There are many worked examples on SO if you search for coxph (or survfit) along with predict.

IRTFM
  • 258,963
  • 21
  • 364
  • 487