Good question, so the cumulative hazard rate is the integral of the hazard rate, so to recover the latter, one could use finite differences on the cumulative hazard, ex: h(t) = (H(t+d) - H(t))/d
However, this is quite a noisy estimate and only non-zero when H(t) changes over the interval [t, t+d]. So after differencing, one can apply a kernel smoother. https://en.wikipedia.org/wiki/Kernel_smoother
In general though, recovering the hazard rate without parametric models is difficult, hence why most people focus on the cumulative hazard.
event_observedvariable should be an array of the same size as your duration array. Can you confirm that your
event_observedis the same size?
lifelines.utilsto transform your data?
class MyWeibullFitter(WeibullFitter): @property def median_confidence_interval_(self): '''get the confidence interval of the median, must call after fit and plot''' if self.median_ != np.inf: self.timeline = np.linspace(self.median_, self.median_, 1) return self.confidence_interval_survival_function_ else: return None
if self.median_ != np.infcheck
cluster_colis CoxPHFitter: https://lifelines.readthedocs.io/en/latest/Examples.html#correlations-between-subjects-in-a-cox-model. Another solution is to strata-ify per machine in the CoxPHFitter.