Red Door Analytics

Most survival software is a patchwork of single-purpose packages, each with its own quirks. merlin takes the opposite approach: one engine fits the models, and a small, focused family builds directly on top of it.

Joint longitudinal–survival models, full Bayesian inference, multi-state and competing risks — all sharing the same syntax, the same prediction machinery, and the same validation. Learn the framework once and the rest follow, whether you work in R or Stata and whether you need frequentist or Bayesian estimates. For health technology assessment see merlin for HTA; for regulated use, Validated.

1shared engine
R + Stataboth ecosystems
10baseline hazard families
Freeopen source
Our packages

One engine, a family of tools

merlin is the engine. morgana adds full Bayesian inference (Stata v1 today; v2 and R in development), pendragon adds multi-state and competing risks (R and Stata, in development), avalon (the successor to survsim) simulates the data to test it all, and gawain validates the predictions that come out — of a merlin model or of anything else.

ENGINE · merlin

merlin

Multilevel mixed-effects survival regression — ten baseline families, cure models, relative-survival decomposition, and time-dependent effects, all under one formula syntax. It is the engine the rest of the family is built on: morgana gives its fits a posterior, pendragon assembles them into state spaces, avalon generates the known-truth data they are tested against, and gawain checks the predictions that come out. The frequentist engine, in R and Stata.

Explore merlin →
BAYESIAN · morgana

morgana

Full Bayesian inference over the merlin engine — every merlin model with posterior uncertainty, built for HTA extrapolation. The Stata package is available now (a bayesmh prefix to stmerlin); the R implementation, sampling via the No-U-Turn Sampler, is in development.

Explore morgana →
MULTI-STATE · pendragon

pendragon

Multi-state and competing-risks models on top of merlin and morgana — transition probabilities, length of stay, restricted mean time in state, and the health-economic outputs, with frequentist or Bayesian bands. The successor to multistate, in R and Stata · in development.

Explore pendragon →
SIMULATION · avalon

avalon

Flexible simulation of survival data — standard, flexible parametric, and user-defined hazards, with competing risks and multi-state structures. The methods-evaluation workhorse, succeeding survsim under one name in R and Stata · in development.

Explore avalon →
VALIDATION · gawain

gawain

Does a survival prediction model discriminate, is it calibrated, and is it useful? Twelve statistics covering all three, for single-event, competing-risks and multi-state outcomes — taking predictions as data, so it evaluates a model fitted in any software. R and Stata · in development.

Explore gawain →
R and Stata

The same methods, in both ecosystems

Both ecosystems are actively developed and supported — pick the one your workflow lives in.

CapabilityRStata
Survival enginemerlinmerlin
Bayesian survivalmorgana · in developmentmorgana
Multi-state & competing riskspendragon · in developmentpendragon · in development
Survival-data simulationavalon · in developmentavalon · in development

multistate (Stata) is pendragon's mature predecessor, and survsim (Stata) is avalon's — both stay available while their successors reach parity. avalon brings survsim's simulation scope to R as well as Stata, so the same API and behaviour are available in both.

Beyond the family

Specialist commands and the full catalogue

Alongside the family, the team builds focused survival commands for specific problems — accelerated failure-time, restricted-cubic-spline, mixed-effects, and excess-hazard models in Stata; multi-state visualisation, trial simulation, and standardised contrasts in R — plus multistate, pendragon's still-maintained predecessor, and the reproducible code behind the papers. They all live, with docs and papers, in one place.

Not sure which package fits your analysis?

Tell us about the model you need. We'll point you to the right package — or, if it doesn't exist yet, scope a bespoke methods engagement around it.

Get in touch Start a project