survival icon indicating copy to clipboard operation
survival copied to clipboard

predict.coxph.penal() gives an error when the model includes strata

Open unoichi opened this issue 10 months ago • 2 comments

ft=coxph(Surv(time, status) ~ age + strata(sex) + frailty(inst, df=4), lung)
predict(ft)

This gives an error message.

Error in newx %*% coef : non-conformable arguments

Also, the following returns a weird result

ft=coxph(Surv(time, status) ~ strata(sex) + frailty(inst, df=4), lung)
predict(ft)

unoichi avatar Apr 25 '24 01:04 unoichi

This is a combination I hadn't seen or tested before: prediction + frailty + frailty has a missing value. I've found the issue, now have to figure out a solution. If you add "model=TRUE" to the first call that will fix the issue, for now

therneau avatar May 03 '24 02:05 therneau

Thank you very much.

unoichi avatar May 03 '24 14:05 unoichi