Survival Model Specification
This package can only be used to fit proportional hazards models of the form:
Where:
- is a parametric baseline hazard function
- is the event time
- is a vector of parameters that parameterise the baseline hazard
- is an arbitrary vector of parameters for subject specified by the longitudinal model
- is a link function that maps to a contribution to the log-hazard function where simply indexes the given link function
- is the subjects covariate design matrix
- is the corresponding coefficients to scale the design matrix covariates contribution to the log-hazard function
The following sections outline the available distributions to users which can be selected for the baseline hazard . Please note that some of these distributions do not have the proportional-hazards property meaning that the resulting survival model corresponding to the hazard will not be of the same parametric family as the baseline distribution with the hazard .
Exponential Distribution
Where: - is the rate parameter
Weibull Distribution (Proportional Hazard Parameterisation)
Where: - is the rate parameter - is the shape parameter Note that with we obtain the exponential distribution as a special case.
Log-Logistic Distribution
Where:
- is the scale parameter
- is the shape parameter
Gamma Distribution
Where:
- $k > 0 $ is the shape parameter
- is the scale parameter
- is the complete gamma function
- is the lower incomplete gamma function
Flat Prior
prior_flat() instead contributes a constant density on the declared parameter scale. It is improper on an unbounded interval and is not invariant under a nonlinear change of scale. Its initialization distribution contributes no density term.
Priors on Transformed Parameters
Let denote a declared model parameter and the scale on which prior information is available. A transformed prior has density
where is the admissible parameter interval, including distribution support. The supported transformations are increasing and one-to-one on their domains. jmpost evaluates truncation bounds on the scale and adds the log absolute Jacobian to the Stan target:
| Transformation | Parameter domain | Log absolute Jacobian |
|---|---|---|
prior_transform_exp() |
||
prior_transform_exp(scale = a),
|
||
prior_transform_square() |
For example, prior_invgamma(1.5, 0.3, transform = prior_transform_exp(2)) places the inverse-gamma prior on . If is a log standard deviation, this is a prior on the variance. It differs from placing an inverse-gamma prior directly on . See the quickstart for examples using residual variances and log-scale intercepts.
The transform argument specifies the prior scale independently of the predictor parametrization. It includes a change-of-variable Jacobian; changing sampling coordinates with an affine multiplier preserves the specified prior distribution.
Covariate Selection with Regularized Horseshoe Prior
In the survival model the covariate coefficients typically just have a normal prior distribution, using prior_normal() or prior_normal_vector(). However, if the user wishes to perform covariate selection then they can instead use the regularized horseshoe prior via prior_horseshoe(). Here we explain how the prior is defined and how the hyperparameters can be set. Note that we use the same parametrization and notation as in the brms package (Bürkner 2017).
The horseshoe prior is a global-local shrinkage prior (Carvalho, Polson, and Scott 2010). The global parameter shrinks all coefficients towards zero, while coefficient-specific local parameters allow some coefficients to escape the shrinkage. The regularized horseshoe prior (Piironen and Vehtari 2017) additionally introduces a slab component that regularizes coefficients that are far from zero. This is useful for covariate selection because all candidate covariates can be included in one model fit, with irrelevant coefficients strongly shrunk towards zero.
For covariate coefficients , the regularized horseshoe prior applied with prior_horseshoe(), and with positive hyperparameters , can be written as
Here denotes a half-Student- distribution with degrees of freedom and scale . The local shrinkage parameters control the amount of shrinkage for each coefficient, while the global shrinkage parameter controls the overall amount of shrinkage across all coefficients. The slab scale and slab degrees of freedom determine how strongly large coefficients are regularized.
Equivalently, conditional on , , and , this implies
The arguments of prior_horseshoe() correspond to these hyperparameters:
-
df: local degrees of freedom, -
df_global: global degrees of freedom, -
df_slab: slab degrees of freedom, -
scale_global: global scale, -
scale_slab: slab scale,
As a special case, setting and gives half-Cauchy priors for the local and global shrinkage parameters. The slab part has the interpretation
which corresponds to a Student- slab with degrees of freedom and scale for coefficients that escape the main shrinkage. Smaller values of imply stronger prior shrinkage towards zero, while larger values allow more coefficients to remain non-zero. The slab scale should be chosen large enough to permit clinically or scientifically plausible covariate effects, but not so large that unrealistically large effects are left essentially unregularized.
A useful summary of the amount of shrinkage applied to coefficient is the shrinkage factor
Values of close to 1 indicate strong shrinkage towards zero, while values close to 0 indicate little shrinkage. Regularized horseshoe priors have been applied in PK/PD covariate selection by Pourzanjani and Davis (2026), where the main practical advantage is the ability to assess all candidate covariates in a single Bayesian model fit.
Longitudinal Model Specification
The longitudinal models in jmpost have each two versions: one without covariates, and one with covariates. In each of the below subsections, we describe both versions. The models without covariates are simpler, and comprise parameters which are study- and treatment-arm-specific and correspondingly indexed. To start with, we describe the commonalities of the longitudinal models having covariates.
Models with Covariates
In the longitudinal models with covariates, the study- and treatment-arm-specific parameters of the longitudinal models without covariates are replaced by subject-specific predictors. For a model parameter , let be the baseline covariates for subject and let be their coefficients, while is the intercept. The model parameter value for subject may then be derived from the intercept and slope parameters together with the covariates by one of the following forms:
Standard-deviation parameters can only use the exponential or log-linear form, because these are strictly positive. The exponential form is with , and the log-linear form is . The exponential form fixes the reference-profile standard deviation at one. When selecting it, the intercept prior must support a positive base; the default scale-intercept priors are chosen for the log-linear form.
A couple of additional points worth calling out:
- Different covariates and parameterisations may be used for each .
- Note that we use here location-scale models, where the mean and standard deviation of the response variable are modelled separately.
- Regarding the detailed implementation in the Stan code, we have introduced the options to switch between centred and non-centred parameterizations for the random effects. By default the baseline random effects use the centred parameterization, because it has been found to generally improve the sampling efficiency and convergence of the model for the baseline parameters. On the other hand, the random effects of all other parameters by default use the non-centred parameterization. See the arguments of the constructors for the respective longitudinal models with covariates for details, for example
?LongitudinalSteinFojoCovdescribes the argumentscentred_baseline,centred_shrinkageandcentred_growth.
Random-Slope Model
where:
- is the tumour size for subject at timepoint
- is the intercept for subject
- is the random slope for subject with
- is the mean for the random slope within treatment arm
- is the variance term for the slope in treatment arm
- is the error term with
- is the treatment arm index for subject
- is the study index for subject
Covariate Version
Following models with covariates, the random-slope model then becomes
Any predictor form above can be used for . The mean and standard deviation of the random slope standard deviation use either the exponential or log-linear parametrization. For example, under the log-linear parametrization, .
The original model is recovered by using study indicators for the covariates of and treatment-arm indicators for the the covariates of and .
Derivative of the SLD Trajectory Link / Growth Parameter Link
Accessible via linkDSLD() & linkGrowth()
Identity Link
Accessible via linkIdentity()
Stein-Fojo Model
Where:
- is the subject index
- is the visit index
- is the observed tumour measurements
- is the expected sum of longest diameter for subject at time point
- is the time since first treatment for subject at visit
- is the subject baseline SLD measurement
- is the subject kinetics shrinkage parameter
- is the subject kinetics tumour growth parameter
- is the treatment arm index for subject
- is the study index for subject
- is the population mean for parameter in group
- is the population variance for parameter .
If using the non-centred parameterisation then the following alternative formulation is used:
Where:
- is a random effects offset on parameter for subject
If using the unscaled variance parameterisation then the following alternative formulation is used:
Covariate Version
Following models with covariates, here we let be a subject-specific predictor for parameter , constructed from parameter-specific baseline covariates. The standard-deviation predictors can only use the exponential or log-linear form.
That means all population parameters, , , , , , and , are constructed from subject-specific predictors.
The original model is recovered by using study indicators for the predictors of and and treatment-arm indicators for those of and as well as those of and .
Derivative of the SLD Trajectory Link
Accessible via linkDSLD()
Time to Growth Link
Accessible via linkTTG()
Identity Link
Accessible via linkIdentity()
Growth Parameter Link
Accessible via linkGrowth()
Shrinkage Parameter Link
Accessible via linkShrinkage()
Population Quantities
When generating population quantities for the , , and parameters, the median of the distribution is used. This has the same interpretation as using a non-centred parameterisation and setting the random effect to zero.
Generalized Stein-Fojo (GSF) Model
The logit-normal distribution is parameterised here as .
Where:
- is the subject index
- is the visit index
- is the observed tumour measurements
- is the expected sum of longest diameter for subject at time point
- is the time since first treatment for subject at visit
- is the subject baseline SLD measurement
- is the subject kinetics shrinkage parameter
- is the subject kinetics tumour growth parameter
- is the subject proportion of cells affected by the treatment
- is the treatment arm index for subject
- is the study index for subject
- is the population location on the transformed scale for parameter in group
- is the population standard deviation on the transformed scale for parameter in group .
If using the non-centred parameterisation then the following alternative formulation is used:
Where:
- is a random effects offset on parameter for subject
If using the unscaled variance parameterisation then the following alternative formulation is used:
Covariate Version
Following models with covariates, here we let be a subject-specific predictor for parameter , constructed from parameter-specific baseline covariates. The standard-deviation predictors can only use the exponential or log-linear form.
That means all population parameters, , , , , , , , and , are constructed from subject-specific predictors.
The original model is recovered by using study indicators for the predictors of and and treatment-arm indicators for those of and , and , and and .
Derivative of the SLD Trajectory Link
Accessible via linkDSLD()
Time to Growth Link
Accessible via linkTTG()
Identity Link
Accessible via linkIdentity()
Growth Parameter Link
Accessible via linkGrowth()
Shrinkage Parameter Link
Accessible via linkShrinkage()
Population Quantities
Note that when generating population quantities for the , , and parameters the median of the distribution is used. This is because this has the same interpretation as using a non-centred parameterisation and setting the “random effects” term to be 0.
Claret-Bruno Model
Where:
- is the subject index
- is the visit index
- is the observed tumour measurements
- is the expected sum of longest diameter for subject at time point
- is the time since first treatment for subject at visit
- is the subject baseline SLD value.
- is the subject tumour growth rate.
- is the subject treatment resistance rate.
- is the subject treatment growth inhibition response.
- is the treatment arm index for subject
- is the study index for subject
- is the population mean for parameter in group
- is the population variance for parameter in group
If using the non-centred parameterisation then the following alternative formulation is used:
If using the unscaled variance parameterisation then the following alternative formulation is used:
Covariate Version
Following models with covariates, here we let be a subject-specific predictor for parameter , constructed from parameter-specific baseline covariates. The standard-deviation predictors can only use the exponential or log-linear form.
That means all population parameters, , , , , , , , and , are constructed from subject-specific predictors.
The original model is recovered by using study indicators for the predictors of and and treatment-arm indicators for those of and , and , and and .
Derivative of the SLD Trajectory Link
Accessible via linkDSLD()
Time to Growth Link
Accessible via linkTTG()
Identity Link
Accessible via linkIdentity()
Growth Parameter Link
Accessible via linkGrowth()
Population Quantities
When generating population quantities for the , , and parameters the median of the distribution is used. This is because this has the same interpretation as using a non-centred parameterisation and setting the “random effects” term to be 0.
Post-Processing
Brier Score
The Brier Score is used to measure a models predictive performance. In the case of Survival Models it is the weighted squared difference between whether a subject died within a given time interval and the models estimated probability of them dying within said interval. Within jmpost the following formula (as described in Blanche et al. (2015)) has been implemented:
Where:
- is the observed event/censor time for subject
- is the event indicator which is 1 if is an event and 0 if is censored
- is the indicator which is 1 if is true else 0
- is the event indicator function for subject e.g.
- is a model predicted probability of subject dying before time
- is the Kaplan-Meier estimator of survival function of the censoring time at
Note that by default is estimated by and that in the case of ties event times are always considered to have occurred before censored times (this is in contrast to survival::survfit which regards censored times as coming before event times when estimating the censoring distribution). Both of these default options can be changed if required.
