How to calculate Median time-to-event based on only the subset of patients who actually experienced an event (rather than of the total number of patients) #1372
              
                Unanswered
              
          
                  
                    
                      chrispoptic
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment
-
| Hi @chrispoptic, I suppose you would just fit the KaplanMeier to only the patients that experienced the event, then call  | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    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.
-
How to calculate Median time-to-event based on the total number of patients who actually experienced an event (rather than of the total number of patients)?
The
median_survival_time_attribute of theKaplanMeierFitterclass returns the estimated median time to event.But this median survival time is evaluated for all patients, regardless of whether the experienced an event or not.
For Kaplan Meier curves where survivor probability never drops below 50%, this leads to returning
numpy.inf.Instead, how to calculate the
median_survival_time_for only the subset of patients who actually experienced an event?Beta Was this translation helpful? Give feedback.
All reactions