# \[ANN\] JointSurvivalModels.jl - A Julia package for joint modeling of survival and longitudinal data

**URL:** <https://discourse.julialang.org/t/ann-jointsurvivalmodels-jl-a-julia-package-for-joint-modeling-of-survival-and-longitudinal-data/110841>\
**Category:** Package Announcements\
**Tags:** statistics, bayesian-inference, modelling\
**Created:** [February 27, 2024, 12:16pm UTC](https://discourse.julialang.org/t/ann-jointsurvivalmodels-jl-a-julia-package-for-joint-modeling-of-survival-and-longitudinal-data/110841 "2024-02-27T12:16:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yannik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yannik/32/47957_2.png) [@Yannik](https://discourse.julialang.org/u/Yannik)\
**Post date:** [February 27, 2024, 12:16pm UTC](https://discourse.julialang.org/t/ann-jointsurvivalmodels-jl-a-julia-package-for-joint-modeling-of-survival-and-longitudinal-data/110841/1 "2024-02-27T12:16:25Z")

</div>

Hi

[JointSurvivalModels.jl](https://github.com/insightsengineering/jointmodels.jl) is a package for Bayesian joint modeling of survival and longitudinal data. You can define distributions based on a hazard function with links to longitudinal models (and covariates).

It subtypes the `ContinuousUnivariateDistribution` type from [Distributions.jl](https://github.com/JuliaStats/Distributions.jl) and implements the calculation of the probability density function / likelihood of observations and the generation of a random sample of your joint survival distribution. Besides the type `JointSurvivalModel` , this package also defines the abstract type `HazardBasedDistribution` which implements the numeric calculations. Given a user-defined hazard function it allows you to calculate various distribution functions and generate random samples.

The motivating application for this software was Bayesian inference frameworks, such as [Turing.jl](https://turinglang.org/), to achieve Bayesian modeling of joint models with non-linear mixed effects models for the longitudinal observations. This requires a numeric approach to the likelihood calculation and for the generation of random samples. It was initially developed for oncology research and now made open source.

I welcome any feedback, ideas, or contributions!
