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

PH models and probability estimates #30

Closed
topepo opened this issue Mar 5, 2021 · 6 comments
Closed

PH models and probability estimates #30

topepo opened this issue Mar 5, 2021 · 6 comments
Labels
feature a feature request or enhancement

Comments

@topepo
Copy link
Member

topepo commented Mar 5, 2021

There is currently some code in aaa_survival_prop.R to estimate survival probabilities for Cox PH models. It might be better to use survift(coxph_object) or basehaz(coxph_object) to get these since they take into account any stratification variables for that model. If that's the case, we might want to save the table produced by those functions in the model object and interpolate the step functions within each strata. Dealing with the strata is a pain, because of how survival encodes them, but some of that work is already done for the parametric model engine.

Also, I don't see any canonical ways of estimating the baseline hazard so that we can get type = "hazard". There as some methods that layer another model on top of the PH model results. It would be good to get community feedback on this.

We might also consider having a type = "cumulative hazard" method

@dincerti

@dincerti
Copy link

dincerti commented Mar 5, 2021

I would echo Max and suggest using survfit() to get survival predictions. It does a lot under the hood and can handle stratification, start/stop data, etc. There is also a summary.survfit() method can can interpolate for arbitrary time points.

type = "cumulative_hazard" would be a good idea and would work for most/all models. Perhaps type = "hazard" could be restricted to models where it is straightforward to compute (i.e., for parametric models)?

@topepo
Copy link
Member Author

topepo commented Mar 9, 2021

Do people ever want (instantaneous) hazard estimates for this model?

@hfrick
Copy link
Member

hfrick commented Apr 16, 2021

update: survival probabilities for coxph models now use survfit()

leaving this open for the (instantaneous) hazard discussion

@hfrick hfrick added the feature a feature request or enhancement label Apr 16, 2021
@dincerti
Copy link

I think hazards can be useful as a diagnostic (e.g., for understanding whether a parametric model seems reasonable, exploring non-proportional hazards). But I don't think they are nearly as useful as other summaries of the survival distribution, particularly in a prediction context.

@hfrick
Copy link
Member

hfrick commented Apr 23, 2021

thanks for the feedback @dincerti !

@hfrick hfrick closed this as completed Jan 12, 2024
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants