Implemeting a custom AFT regression model for bathtub-like hazard shapes #1447
              
                Unanswered
              
          
                  
                    
                      Argantonio65
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment 1 reply
-
| Try using the  | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear lifelines users,
I'm working on a survival regression problem where I have what is probably a bathtub-like hazard rate function. Unfortunately, none of the implemented AFT regression models support this form which is quite common in reliability problems. See below a comparison of Kaplan-Meier, a Cox-Proportional Haz and an AFT with a Generalized Gamma for my dataset:
I have been trying to implement a custom AFT model that can cover bathtub-like hazard functions. In particular, I have been trying to implement the log-normal power model (proposed in Reed, W. J. (2011). A flexible parametric survival model which allows a bathtub-shaped hazard rate function. Journal of Applied Statistics, 38(8), 1665-1680.). Following the lifelines documentation on user-defined AFT models, it seems it is sufficient to implement the cumulative hazard function in the general class.
see my implementation here:
Unfortunately, I get the following error:
Does anyone with experience implementing lifelines AFT models have some advice on how to follow?
Is there more documentation on how to implement custom AFT models? It would be great to be able to contribute with new distributions.
Also, did anyone experience fitting regression models on bathtub like hazard functions in lifelines?
Many thanks
Regards
Beta Was this translation helpful? Give feedback.
All reactions