CamDavidsonPilon / lifelines

Survival analysis in Python
lifelines.readthedocs.org
MIT License
2.37k stars 560 forks source link

Tobit models #206

Open jamesdj opened 8 years ago

jamesdj commented 8 years ago

I'm interested in the case where censoring can be on the left or the right (not both) for each observation. In my particular use case, all observations are censored on one or the other side. For example, with survival, say we check in on patients' status at intervals, and record only whether they were alive or dead when we check. When they are observed dead, we know only an upper bound on their survival time; when they are observed alive, we know only a lower bound. From what I understand, this can modeled using what in the literature is called a Tobit model. It looks like someone was working on this for the statsmodels package, but may not have finished it.

jamesdj commented 8 years ago

I implemented this for another project, and you are welcome to use the code if you like. Here's the repo.