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

Feature request: Select specific state for competing risks model using tbl_survfit #2051

Closed
BG-55 opened this issue Oct 30, 2024 · 3 comments

Comments

@BG-55
Copy link

BG-55 commented Oct 30, 2024

Hi,
I am a big fan of this package. It's a very helpful resource. I have been doing competing risks analysis and using tbl_survfit to get the survival times. I was wondering being able to select the specific state from the competing risks/multi state model could be added to tbl_survfit? I have multiple outcomes that I would like to know the survival times for, but tbl_survfit only seems to pick the first outcome in my factor to give me the survival times for. Being able to select a specific state or even a vector of states would be very helpful. I am new to Github, so I hope made this correctly. Thank you so much in advance for any help you can provide!

@ddsjoberg
Copy link
Owner

Hi @BG-55 , thanks for the post! Delighted the package has been helpful for you

Since most users of tbl_survfit() are probably unaware of the existence of competing risks, I don't know if I want to include an argument that would only apply to these models. But have you seen this function https://mskcc-epi-bio.github.io/tidycmprsk/reference/tbl_cuminc.html

It does pretty much the same thing, but specifically for competing risks

@BG-55
Copy link
Author

BG-55 commented Oct 30, 2024

No problem! That makes sense. I usually fit models using survfit rather than cuminc, but I assume they both use the Aalen-Johansen estimator, so I can give that function a whirl. Thank you for letting me know about that function. I had not used it before.

@ddsjoberg
Copy link
Owner

The tbl_cuminc() function uses cmprsk package to do the calculations, which from my view, is the standard package for competing risks in R. So that could be a good option

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