SurPyval: Survival Analysis with Python
Derryn Knife · The Journal of Open Source Software · 2021
Survival analysis is being increasingly used by scientists, data scientists, engineers, econometricians, and many other professionals to solve their problems.Survival analysis is a unique set of tools that are used to estimate either the time to an event or the chance of an event happening.That is, survival analysis allows you to estimate how long something is likely to last or what risk there is of some event happening in the future.This is vital for fields such as the medical sciences where we need to know how long someone with a particular diagnosis might live or if a treatment or intervention is successful at prolonging life.In engineering it is useful to understand the risk that fielded equipment might fail.For an insurance company it is necessary to help price policies and in economics it is useful for estimating the durations of recessions or the time to the next recession.Survival analysis in these examples encounter interesting kinds of data, for example, engineers conducting life testing may have components that do not fail during the observation period, or that might fail between two inspections.In this case the data is said to be censored.In medical trials you might have subjects enter a trial later than other subjects while insurance claims are only lodged above the excess value on the policy.In these cases the data is said to be truncated.These considerations are unique to survival analysis and are critical to handle correctly to make appropriate predictions or find significant differences.SurPyval is a pure-Python package, making installation and maintenance simple.Furthermore, SurPyval is a flexible and robust survival analysis package that can take as input an arbitrary combination of observed, censored, and truncated data over a wide number of distributions and their variations.For this reason SurPyval is likely to be of interest to a wide field of analysts in broad industries including finance, insurance, engineering, medical science, agricultural science, economics, and many others.