So if I were wanting to predict survival probabilities using a
cph model in R, I could simply do something like the following:
p1 <- data.frame(Predict(m1, isdiabetes="Yes", ageyear=seq(35,85,0.1), time=30))
m1 is my model, and
ageyear are both predictors in
m1, amongst a (large number) of others.
If I am now in
brms world, I fit my model again, and would like to produce a similar set of predictions based on varying a single predictor alongside specifying the presence of some comorbidty like diabetes in this case. It seems that my only option is to specify a big data frame explicitly setting all other predictors to their “null” values and using
predict in order to replicate this behaviour, or is there an alternative that is easier than this? It is of course not the worst problem in the world and potentially niche, but I think for readability and simplicity an approach like the example above would be preferable as these scenarios occur quite often for me at least.
- Operating System: Mac OS Big Sur
- brms Version: 2.14.4