zahrcast
sia · zahrcast's forecasting platform

the software behind the forecasts

Sia forecasts survival endpoints, such as progression-free and overall survival, in an ongoing trial from the data collected so far. It links each patient's disease burden to progression, death and leaving the trial in one Bayesian analysis. The forecasts in the case studies on this site were produced with Sia.

what a trial team can do with sia

four uses

forecast an ongoing trial

Fit the data up to an interim cut-off and simulate the rest of the trial. Sia removes data after the cut-off before it builds the model. It can simulate each enrolled patient from their own record, or simulate new patients from the population.

borrow from earlier trials

Use the posterior from earlier trials in the same indication as the prior for a new one. Sia estimates how much to widen that prior for each group of parameters, so it borrows less when the trials disagree.

model a new indication

Write a declaration with the indication's states, markers and assessment schedules. The four case studies on this site are four declarations. The pancreatic model uses tumor size and CA19-9. The prostate model has separate schedules for imaging and PSA.

check the model first

Score forecasts made at earlier cut-offs against the data that came after them. Run prior predictive simulations and prior sensitivity analyses. Sia refuses a declaration, prior or dataset it cannot fit, and names the entry at fault.

inputs and outputs

what goes in, what comes out

Sia works from the patient-level data a trial already collects. It returns the range of results the trial could still report, with a probability for each.

The inputs, the fitted model and the outputs belong to the client. The fitted model is the posterior for every parameter, learned from the client's data, and zahrcast does not use it for other clients. The Sia platform remains the property of zahrcast. The client's fitted model runs on the platform, and every output is produced from it there.

inputs · client-owned
burden measurementsat each assessment, such as the sum of longest tumor diameters or PSA
baseline covariatesclinical characteristics, biomarkers, ctDNA
event historyprogression, death, leaving the trial, and the end of follow-up
historical trialsoptional, in the same indication, to borrow from
priorsfor each parameter
model specificationa declaration of the states, markers and covariates
sia platform zahrcast-owned
  1. fitto the data so far. Historical trials enter as a borrowing prior or in a hierarchical pool.
fitted model · client-ownedthe parameters learned from the client's data, run on the platform
  1. roll forwardeach patient, thousands of times
  2. read offany endpoint from the simulated trials
outputs · client-owned
results at maturitysurvival curves, medians, response rates, hazard ratios and landmark survival, with credible intervals
probability of benefitthat the benefit exceeds a threshold you choose
burden forecastsfor each patient, over the coming assessments
forecast scoreshow forecasts from earlier cut-offs matched later data

Every number is read off thousands of simulated completed trials. How the simulations work.

how it works

two linked submodels

A mechanistic submodel describes each patient's disease burden over time. A multistate submodel describes the transitions to progression, death and leaving the trial, with the burden as an input. The two are fitted together.

Models of this kind are called joint models for longitudinal and time-to-event data.1–4 When a joint model is fitted to a patient's measurements so far, its predictions for that patient update as new measurements arrive.5 In oncology, nonlinear models of tumor size or PSA have been linked to survival in colorectal, lung, prostate and bladder cancer.6–9 Bruno and colleagues review these tumor dynamic models.10 A model with several event states, such as progression and death, is a multistate model.11 Earlier work has joined multistate models to longitudinal measurements12 and used them to model progression-free and overall survival together.13

patient-level inputs forecast endpoints burden measurements such as tumor size or PSA baseline covariates clinical, biomarker, ctDNA event history progression, death and leaving the trial mechanistic submodel disease burden over time: decline, nadir and regrowth, per patient latent time-varying covariates current burden and growth rates multistate submodel progression, death and leaving the trial progression-free survival composite and cause-specific overall survival derived from the states other endpoints response rate, hazard ratios, landmark survival

Progression-free and overall survival come from the same simulated trials, so they are consistent with each other. The diagram is redrawn from the ES-SCLC manuscript,14 without the mathematical notation.

burden dynamics

Each patient's burden follows a bi-exponential curve that extends the form of Stein and colleagues:15 a shrinking part declines while a growing part regrows.

borrowing

Sia estimates how much to borrow from historical trials. When they disagree, it borrows less. Related methods include power priors, commensurate priors and robust meta-analytic-predictive priors.16–18

new indications

A new indication usually needs new priors and data handling rather than changes to Sia's core code.

validation

Forecasts are scored against data that arrived after their cut-off. This is leave-future-out validation.19

Sia is written in Julia.20 Its statistical code is written in Turing.jl21 and fitted with the No-U-Turn sampler, a form of Hamiltonian Monte Carlo.22 These are open-source tools, so a client's statistician can check how the fitting works.

model declarations

one block per disease

A Sia model is written as a declaration. It lists the states a patient can occupy, the transitions between them, the markers that are measured and the groups patients belong to. Sia builds, fits and checks the model from that declaration, and forecasts from it.

The example below declares a joint model for small-cell lung cancer. It has two markers, tumor size on imaging and circulating tumor DNA (ctDNA), five states and endpoints for progression-free and overall survival. It shows the form of a declaration. The SCLC case study on this site used a different model, without ctDNA.

show the example declaration
using Sia

# Smooth, time-varying baseline hazards on a four-week grid
const CALENDAR = (shape = :gaussian_process, knot_spacing = 4, knots_until = 200, between_knots = :hold)
const AFTER_PD = (shape = :gaussian_process, knot_spacing = 4, knots_until = 108, between_knots = :hold)
const OFF_TX   = (shape = :gaussian_process, knot_spacing = 4, knots_until = 24,  between_knots = :hold)

sclc = Sia.@model_config begin
    @burden begin
        rates => (shrink   = (levels = (trial = :re, arm = :re), covariates = ~ ecog + ldh,
                              coupling_centre = -2.2),
                  regrowth = (levels = (trial = :re, arm = :re), covariates = ~ ecog + ldh,
                              coupling_centre = -3.7))
        shrinking_fraction => (levels = (arm = :re,),)
        regrowth_slowdown  => (levels = (arm = :re,),)
        reference = :sld
        @markers begin
            sld   => (obs_noise = :student_t,)
            ctdna => (elasticity = :estimated, baseline_window = 2.0, obs_noise = :student_t,
                      baseline = (levels = (arm = :re,), covariates = ~ ecog))
        end
    end

    @states begin
        0 => "on treatment"
        1 => "progressed"
        2 => "dead"
        3 => "lost to follow-up"
        4 => "discontinued"
    end

    @transitions begin
        0 → 1 => (detection = :at_visits, burden_coupling = :interpolated,
                  deterministic_cause = :recist,
                  trend = (shape = :logtime, centred_until = 200),
                  baseline = (curve = CALENDAR, beyond_knots = :extend),
                  covariates = ~ age + ecog,
                  levels = (arm = (intercept = :re, trend = :re, curve = CALENDAR),))
        0 → 2 => (detection = :exact, burden_coupling = :none,
                  baseline = (curve = CALENDAR, beyond_knots = :extend),
                  covariates = ~ age + ecog + ldh,
                  levels = (arm = (intercept = :re, curve = CALENDAR),))
        1 → 2 => (detection = :exact, burden_coupling = :none, clock = :sojourn,
                  baseline = (curve = AFTER_PD, beyond_knots = :extend),
                  levels = (arm = (intercept = :re, curve = AFTER_PD),))
        0 → 3 => (detection = :at_visits, burden_coupling = :interpolated,
                  baseline = (curve = CALENDAR, beyond_knots = :extend),
                  levels = (arm = (intercept = :re, curve = CALENDAR),))
        0 → 4 => (detection = :exact, burden_coupling = :last_scan,
                  baseline = (curve = CALENDAR, beyond_knots = :extend),
                  levels = (arm = (intercept = :re, curve = CALENDAR),))
        4 → 1 => (detection = :at_visits, burden_coupling = :none, clock = :sojourn,
                  baseline = (curve = OFF_TX, beyond_knots = :extend),
                  levels = (arm = (intercept = :re, curve = OFF_TX),))
        4 → 2 => (detection = :exact, burden_coupling = :none, clock = :sojourn,
                  baseline = (curve = OFF_TX, beyond_knots = :extend),
                  levels = (arm = (intercept = :re, curve = OFF_TX),))
    end

    @frailty begin
        (0 → 1, 0 → 3)
    end

    @levels begin
        trial => (groups = :trial,)
        arm   => (groups = :arm,)
    end

    @endpoints begin
        pfs => (event      = (0 → 1, 4 → 1, 0 → 2, 4 → 2),
                censoring  = (0 → 3,),
                irrelevant = (1 → 2, 0 → 4))
        os  => (event      = (0 → 2, 1 → 2, 4 → 2),
                censoring  = (0 → 3,),
                irrelevant = (0 → 1, 4 → 1, 0 → 4))
    end

    @precedence begin
        0 => (0 → 3, 0 → 4, 0 → 1, 0 → 2)
        4 => (4 → 1, 4 → 2)
    end
end
@burden

The burden trajectory, how it varies by trial and arm, and the covariates that shift it. Tumor size (sld) is the reference marker. ctDNA measures the same burden on its own scale.

@transitions

For each transition: whether it is detected at scheduled scans or on the day it happens, which clock it runs on, and whether the burden enters its hazard.

@frailty

Progression and loss to follow-up share a patient-level random effect.

@endpoints

Which transitions count as events, censoring or neither for progression-free and overall survival.

@precedence

How events found at the same visit are ordered. The fit and the forecast use the same order.

@levels

The groups patients are pooled across, such as trial and arm.

Sia checks the whole declaration before fitting. If an entry is invalid, Sia stops with a message that names it. Priors are declared in the same way, against the same names. Adding a state, a marker or a level changes the declaration and leaves Sia's code unchanged.

capabilities

what Sia supports

Everything listed here is in Sia's released code. Each modeling choice is set in the model declaration.

disease burden
  • A bi-exponential trajectory for each patient: a shrinking part and a regrowing part
  • Optional slowing of regrowth, a mixture of growth patterns and a step change at progression
  • Covariates on any burden parameter
  • Variation by trial and by arm, as random or fixed effects
markers
  • Several markers as measurements of one latent burden, such as tumor size and CA19-9
  • For each marker: its sensitivity to burden, estimated or fixed, its noise model, normal or Student-t, its detection limits and its baseline window
  • Each marker on its own measurement schedule
  • Forecast trajectories for each marker
clinical events
  • Up to ten states, with competing routes into a state
  • For each transition: detection at scheduled visits or on the exact date, a calendar clock or a time-in-state clock, and its own assessment schedule
  • Burden enters a hazard interpolated between scans, at the last scan, as measured, or not at all
  • Baseline hazards that change over time, as Gaussian processes or random walks
  • Correlated patient frailties across transitions
  • Progression defined by RECIST from the modeled tumor size
  • Events at the same visit ordered by a declared precedence, the same in the fit and the forecast
pooling and borrowing
  • Trial and arm levels on burden and hazard parameters
  • Borrowing from earlier trials: their posterior becomes the prior for the new fit, with an inflation factor for each group of parameters that is estimated from the data
  • Checks that stop a trial's own patients from entering its historical prior
priors
  • Every prior declared by name. A missing prior, or one with the wrong support, stops the fit before it starts
  • Prior predictive simulation from the same model
  • Prior terms saved with each fit for power-scaling sensitivity analysis
fitting
  • The No-U-Turn sampler through Turing.jl, with chains run in sequence, on threads or on separate processes
  • Reverse-mode automatic differentiation with Mooncake.jl
  • Refits start from the sampler settings tuned in the previous fit, which shortens warm-up
  • Seeded chains that reproduce exactly
forecasts
  • Forecasts from any interim data cut-off. Data after the cut-off are removed before the model is built
  • Five simulation modes: conditional on each patient's own record, unconditional, or with patient effects redrawn from the population, each of the last two with or without censoring at observed follow-up
  • Kaplan-Meier curves, or cumulative incidence curves where endpoints compete, for every declared endpoint
  • Medians and other quantiles, landmark survival and RECIST objective response rate
  • Burden, marker and RECIST forecasts for each patient
validation
  • Leave-future-out scores for forecasts made at earlier cut-offs
  • Per-patient terms for whole-patient leave-one-out scoring
  • An independent data simulator, written separately from the fitting code, that cross-checks the forecasting code
  • Results from a set of test models compared with saved values after every change
  • Gradients checked against numerical estimates
  • More test code than platform code
outputs
  • Draws and forecasts saved as NetCDF files with named dimensions, which R and Python read directly
  • Forecasts and scores organized by patient, arm, endpoint and cut-off
where it has been applied

indications so far

Sia has been applied to extensive-stage small-cell lung cancer, metastatic colorectal cancer, metastatic castration-resistant prostate cancer and metastatic pancreatic cancer. Each case study compares forecasts made at interim cut-offs with the survival observed at the trial's final data cut.23

contact

if you have a trial in flight

We work with your team to declare a model for your disease, fit it to your trials and deliver the forecasts. Engagement terms are available on request. The Sia source is private.

references
  1. Wulfsohn MS, Tsiatis AA. A joint model for survival and longitudinal data measured with error. Biometrics. 1997;53(1):330–339. doi:10.2307/2533118.
  2. Henderson R, Diggle P, Dobson A. Joint modelling of longitudinal measurements and event time data. Biostatistics. 2000;1(4):465–480. doi:10.1093/biostatistics/1.4.465.
  3. Ibrahim JG, Chu H, Chen LM. Basic concepts and methods for joint models of longitudinal and survival data. Journal of Clinical Oncology. 2010;28(16):2796–2801. doi:10.1200/JCO.2009.25.0654.
  4. Rizopoulos D. Joint Models for Longitudinal and Time-to-Event Data: With Applications in R. Boca Raton: Chapman & Hall/CRC; 2012. doi:10.1201/b12208.
  5. Rizopoulos D. Dynamic predictions and prospective accuracy in joint models for longitudinal and time-to-event data. Biometrics. 2011;67(3):819–829. doi:10.1111/j.1541-0420.2010.01546.x.
  6. Claret L, Girard P, Hoff PM, et al. Model-based prediction of phase III overall survival in colorectal cancer on the basis of phase II tumor dynamics. Journal of Clinical Oncology. 2009;27(25):4103–4108. doi:10.1200/JCO.2008.21.0807.
  7. Wang Y, Sung C, Dartois C, et al. Elucidation of relationship between tumor size and survival in non-small-cell lung cancer patients can aid early decision making in clinical drug development. Clinical Pharmacology & Therapeutics. 2009;86(2):167–174. doi:10.1038/clpt.2009.64.
  8. Desmée S, Mentré F, Veyrat-Follet C, Sébastien B, Guedj J. Using the SAEM algorithm for mechanistic joint models characterizing the relationship between nonlinear PSA kinetics and survival in prostate cancer patients. Biometrics. 2017;73(1):305–312. doi:10.1111/biom.12537.
  9. Kerioui M, Mercier F, Bertrand J, et al. Bayesian inference using Hamiltonian Monte-Carlo algorithm for nonlinear joint modeling in the context of cancer immunotherapy. Statistics in Medicine. 2020;39(30):4853–4868. doi:10.1002/sim.8756.
  10. Bruno R, Bottino D, de Alwis DP, et al. Progress and opportunities to advance clinical cancer therapeutics using tumor dynamic models. Clinical Cancer Research. 2020;26(8):1787–1795. doi:10.1158/1078-0432.CCR-19-0287.
  11. Putter H, Fiocco M, Geskus RB. Tutorial in biostatistics: competing risks and multi-state models. Statistics in Medicine. 2007;26(11):2389–2430. doi:10.1002/sim.2712.
  12. Ferrer L, Rondeau V, Dignam J, et al. Joint modelling of longitudinal and multi-state processes: application to clinical progressions in prostate cancer. Statistics in Medicine. 2016;35(22):3933–3948. doi:10.1002/sim.6972.
  13. Meller M, Beyersmann J, Rufibach K. Joint modeling of progression-free and overall survival and computation of correlation measures. Statistics in Medicine. 2019;38(22):4270–4289. doi:10.1002/sim.8295.
  14. Naguib K, Berché R, Li L, et al. PIONEER: Bayesian Joint Modelling of Mechanistic Tumour Growth and Time-to-Event Endpoints for Dynamic Prediction of Ongoing Oncology Trials. arXiv:2607.17908. 2026. arxiv.org/abs/2607.17908.
  15. Stein WD, Figg WD, Dahut W, et al. Tumor growth rates derived from data for patients in a clinical trial correlate strongly with patient survival: a novel strategy for evaluation of clinical trial data. The Oncologist. 2008;13(10):1046–1054. doi:10.1634/theoncologist.2008-0075.
  16. Ibrahim JG, Chen MH. Power prior distributions for regression models. Statistical Science. 2000;15(1):46–60. doi:10.1214/ss/1009212673.
  17. Hobbs BP, Carlin BP, Mandrekar SJ, Sargent DJ. Hierarchical commensurate and power prior models for adaptive incorporation of historical information in clinical trials. Biometrics. 2011;67(3):1047–1056. doi:10.1111/j.1541-0420.2011.01564.x.
  18. Schmidli H, Gsteiger S, Roychoudhury S, et al. Robust meta-analytic-predictive priors in clinical trials with historical control information. Biometrics. 2014;70(4):1023–1032. doi:10.1111/biom.12242.
  19. Bürkner PC, Gabry J, Vehtari A. Approximate leave-future-out cross-validation for Bayesian time series models. Journal of Statistical Computation and Simulation. 2020;90(14):2499–2523. doi:10.1080/00949655.2020.1783262.
  20. Bezanson J, Edelman A, Karpinski S, Shah VB. Julia: a fresh approach to numerical computing. SIAM Review. 2017;59(1):65–98. doi:10.1137/141000671.
  21. Ge H, Xu K, Ghahramani Z. Turing: a language for flexible probabilistic inference. In: Proceedings of the 21st International Conference on Artificial Intelligence and Statistics. PMLR 84; 2018:1682–1690. proceedings.mlr.press/v84/ge18b.html.
  22. Hoffman MD, Gelman A. The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo. Journal of Machine Learning Research. 2014;15(47):1593–1623. jmlr.org/papers/v15/hoffman14a.html.
  23. This publication is based on research using information obtained from www.projectdatasphere.org, which is maintained by Project Data Sphere. Neither Project Data Sphere nor the owner(s) of any information from the web site have contributed to, approved or are in any way responsible for the contents of this publication.