Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
unoichi opened this issue Apr 25, 2024 · 2 comments
Open

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

unoichi opened this issue Apr 25, 2024 · 2 comments

Comments

@unoichi
Copy link

unoichi commented Apr 25, 2024

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)
@therneau
Copy link
Owner

therneau commented May 3, 2024

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

@unoichi
Copy link
Author

unoichi commented May 3, 2024

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants