This package implements joint models in Julia. It was designed to support the modeling of joint models with probabilistic programming, for example using the Turing.jl framework. Install it with:
using Pkg
Pkg.add("JointSurvivalModels")
The JointSurvivalModel
type implements a canonical formulation of joint models. It based on a joint hazard function JointSurvivalModels
](@ref JointSurvivalModel).
The hazard of the exponential distribution
using JointSurvivalModels
constant_alpha(x) = 0.2
γ = 0.5
jm = JointSurvivalModel(constant_alpha, γ, cos)
Plotting the survival function vs the baseline hazard:
using StatsPlots, Distributions
r = range(0,12,100)
plot(r, ccdf(Exponential(1/0.2), r), label="Baseline survival")
plot!(r, ccdf(jm, r), label="Joint Survival")
For a more instructive example take a look at the documentation First Example or the case study found in example/
in the project folder.
For the numeric calculation for the distribution a default support (0.001,10'000) is set. In particular the first events happen after HazardBasedDistribution
](@ref HazardBasedDistribution). For example:
JointSurvivalModels.support(dist::HazardBasedDistribution) = (-100, 100)