# \[ANN\] SurvivalAnalysis.jl

**URL:** <https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680>\
**Category:** Package Announcements\
**Tags:** package, announcement\
**Created:** [September 2, 2022, 7:57am UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680 "2022-09-02T07:57:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaphaelS1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raphaels1/32/39133_2.png) [@RaphaelS1](https://discourse.julialang.org/u/RaphaelS1)\
**Post date:** [September 2, 2022, 7:57am UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680/1 "2022-09-02T07:57:27Z")

</div>

Very happy to announce my first Julia package [SurvivalAnalysis.jl](https://juliahub.com/ui/Packages/SurvivalAnalysis/N9zkY?t=2) v0.1.0! (See original tweet announcement [here](https://twitter.com/RaphaelS101/status/1564936584700502016)).

The package implements features for survival analysis (AKA: time-to-event modelling, reliability analysis, duration analysis, churn analysis, and more). The goal of the package is to include a comprehensive interface for baseline requirements to run different types of analysis, including inference and prediction. I am still deciding how best to grow the package and welcome feedback and discussion [here](https://github.com/RaphaelS1/SurvivalAnalysis.jl/discussions/62).

Currently included in the package:

- Non-parametric estimators (Kaplan-Meier and Nelson-Aalen) and plotting for these
- Parametric models (PH and AFT) for Exponential and Weibull distributions
- Discrete and continuous survival prediction objects, including distribution, linear predictor and general risk return types
- Surv object for unified censoring indicator (functionality for left, right, interval)
- Extended formula interface for survival objects

Planned:

- [CoxPH](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/8)
- [Log-rank tests](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/10)
- [Residuals (Schoenfeld etc.)](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/11)
- [Predict type transformations](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/12)
- [Generic plotting functionality](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/13)
- [Proportional odds functionality](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/14)
- [More parametric AFTs](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/15)
- [Analytical optimisation](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/16)
- [Discrimination measures](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/17)
- [Scoring rules](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/19)
- [Calibration measures](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/18)
- [Bayesian interface](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/20)
- [mlr3proba integration](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/21)
- [MLJ integration](https://github.com/RaphaelS1/SurvivalAnalysis.jl/issues/22)

---

<div class="post-metadata">

**Author:** ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Post date:** [September 2, 2022, 12:12pm UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680/2 "2022-09-02T12:12:20Z")

</div>

This is a great addition to the ecosystem!

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [September 2, 2022, 2:14pm UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680/3 "2022-09-02T14:14:15Z")

</div>

Awesome stuff. This is a critical package for a lot of statisticians and experts doing research in non-mathematical domains.

---

<div class="post-metadata">

**Author:** ![TheCedarPrince](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thecedarprince/32/17323_2.png) [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Post date:** [September 2, 2022, 2:42pm UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680/4 "2022-09-02T14:42:10Z")

</div>

This is fantastic and by coincidence, I just finished reading your paper [Flexible Group Fairness Metrics for Survival Analysis](https://arxiv.org/abs/2206.03256) today and was curious what the state of the art in Julia is for survival analysis. This is my answer - amazing work! Do you intend on integrating this with [Fairness.jl](https://github.com/ashryaagr/Fairness.jl)?

Cheers and great work! Excited to see where it all goes. 😄

~ tcp 🌳

---

<div class="post-metadata">

**Author:** ![RaphaelS1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raphaels1/32/39133_2.png) [@RaphaelS1](https://discourse.julialang.org/u/RaphaelS1)\
**Post date:** [September 2, 2022, 3:21pm UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680/5 "2022-09-02T15:21:32Z")

</div>

Funnily enough I work with the creator of that repo but wasn’t aware it existed! Will chat with them and see what we can do 🙂 Hope you enjoyed the paper!

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 3, 2022, 7:24am UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680/6 "2022-09-03T07:24:06Z")

</div>

Great to see more options for survival analysis in the community, thank you! Could you comment on the differences and commonalities between this package and [Survival.jl](https://github.com/JuliaStats/Survival.jl)

---

<div class="post-metadata">

**Author:** ![RaphaelS1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raphaels1/32/39133_2.png) [@RaphaelS1](https://discourse.julialang.org/u/RaphaelS1)\
**Post date:** [September 3, 2022, 10:05am UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680/7 "2022-09-03T10:05:51Z")

</div>

Absolutely. In terms of implementation, `Survival.jl` includes Kaplan-Meier and Nelson-Aalen estimators, Cox PH, and an object for right-censoring, in contrast `SurvivalAnalysis.jl` includes everything above. Our implementations for the estimators are pretty similar, though I noticed some inconsistencies in accuracy of outputs. My `Surv` object is slightly slower in construction than the `EventTime` object in `Survival.jl`, but that’s due to a lot of computation occurring in construction of my object, which then cuts runtime in models and measures later on. I’ve spoken with Alex Arslan about missing features in my package, and will copy their implementation of Cox PH (probably today) so that features in `Survival.jl` will be a subset of `SurvivalAnalysis.jl`.

---

<div class="post-metadata">

**Author:** ![Sourish](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sourish/32/34156_2.png) [@Sourish](https://discourse.julialang.org/u/Sourish)\
**Post date:** [September 11, 2022, 1:56pm UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680/8 "2022-09-11T13:56:50Z")

</div>

Thanks for taking the initiative. We would like to contribute to your project. How can we contribute to your project?

---

<div class="post-metadata">

**Author:** ![RaphaelS1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raphaels1/32/39133_2.png) [@RaphaelS1](https://discourse.julialang.org/u/RaphaelS1)\
**Post date:** [September 11, 2022, 2:43pm UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680/9 "2022-09-11T14:43:44Z")

</div>

Hey, great to hear you want to contribute. I’m happy to chat in a GitHub discussion or issue, or on the Julia Slack, or setup a call, what’s your preference?

I’ll add a contributor guidelines file soon to streamline this in the future

---

<div class="post-metadata">

**Author:** ![Sourish](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sourish/32/34156_2.png) [@Sourish](https://discourse.julialang.org/u/Sourish)\
**Post date:** [September 11, 2022, 4:05pm UTC](https://discourse.julialang.org/t/ann-survivalanalysis-jl/86680/10 "2022-09-11T16:05:46Z")

</div>

Hi Raphael:

Thanks for such a quick response. It would be great if we could have a call and discuss how we can collaborate, and then we can put our discussion from the call on the GitHub issue and agree to what to develop, then develop the code and make PR.

We are a small group working on developing some packages in Julia and trying to contribute to Julia’s ecosystem. You can find about us here:

> **[xKDR](https://github.com/xKDR)**
>
> xKDR is a cross-disciplinary research organisation in Mumbai, India, which is engaged in a wide array of applied statistics research. - xKDR

Thanks and regards,  
Sourish
