# How to estimate the hazard function?

I model the survival data with a piece wise constant exponential distribution at time t. Let R be the total number of the population at time t, and D be the number of deaths observed at time t+dt. So, we may estimate the local hazard function as D/dt from the Poisson process or as D/R from the Kaplan-Meier model. Could we make connections between the two formulas or am I wrong somewhere?

• "a piece wise constant". Who is constant? – user158565 Dec 3 '18 at 15:19
• Yes! It's constant in the interval [t, t+dt]. – Julien Wang Dec 4 '18 at 9:02
• "constant exponential distribution"? – user158565 Dec 4 '18 at 14:17

I wrote an R package pammtools specifically to do so. See this vignette to get started with PEM and PAMM: https://adibender.github.io/pammtools/articles/baseline.html
In the articles section there are many more examples (and comparisons to other models, e.g. survival::coxph: https://adibender.github.io/pammtools/articles/