strengejacke / ggeffects

Estimated Marginal Means and Marginal Effects from Regression Models for ggplot2
https://strengejacke.github.io/ggeffects
Other
553 stars 35 forks source link

threshold calculations from ggpredict, type="survival" #223

Open cperk opened 3 years ago

cperk commented 3 years ago

Hi @strengejacke !

Is there a way to make calculations based on ggpredict, type=survival? For example, using the model in #199 I would like to estimate survival time at which 25% of the overall population has died. I would also like to do this for each group, e.g. day on which 25% of each group (Treatment) has died.

Finally, is there a way to add dashed pointer lines to show these thresholds? See this graph from the survival package that includes median survival lines for reference.

Screen Shot 2021-06-16 at 12 39 31 PM

Thanks!!

-Carrie

strengejacke commented 3 years ago

Hi Carrie, sorry for being so quiet, but I'm currently focusing on other packages, and will get back to ggeffects after the summer break. But I'll give your issue a closer look the next days.

DanSimonet commented 1 year ago

+1 for this recommendation. It would be very useful to specify different time values in ggpredict to get custom estimates of probability of survival. Since survival models do not include time as a term in the formula it is unclear how to request different intervals. :heart: the package! Use it often.