pymc-devs / pymc-examples

Examples of PyMC models, including a library of Jupyter notebooks.
https://www.pymc.io/projects/examples/en/latest/
MIT License
280 stars 243 forks source link

Frailty survival model #580

Closed NathanielF closed 10 months ago

NathanielF commented 1 year ago

Frailty Models - Hierarchical Survival Models

Related to this issue: https://github.com/pymc-devs/pymc-examples/issues/579

Leaving as Draft for now.

Helpful links


:books: Documentation preview :books:: https://pymc-examples--580.org.readthedocs.build/en/580/

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

review-notebook-app[bot] commented 12 months ago

View / edit / reply to this conversation on ReviewNB

ricardoV94 commented on 2023-10-08T23:16:38Z ----------------------------------------------------------------

Any reason not to use pm.Censored for the likelihood ?


NathanielF commented on 2023-10-09T07:54:47Z ----------------------------------------------------------------

In the case of the CoxPH regression the "Poisson trick" is a classic of the literature and it works to give me the results i was expecting. It's also consistent with the approach already documented in Austin's notebook.

More generally in the case of the AFT models below. I tried using the pm.Censored with the Weibull regression, but it gave me garbage results and was allot slower than using the Potential. And again in the case of the Weibull AFT my current parameterisation gives the expected results.

But maybe i'm missing something, was there a pattern of usage you had in mind w.r.t. to using censored liklihoods for survival?