Red Door Analytics

RDA avalon

Survival-data simulation in R and Stata under one name — standard, flexible parametric, fitted-model and user-defined hazards, with competing risks and multi-state structures. In active development.

In development · planned releaseOpen source · R + StataSimulation of survival data

Coming

November 2026

Not yet released avalon is in build for R and Stata.

One email, when it lands. Nothing else, and you can unsubscribe from it.

Survival-data simulation · R + Stata · in development

What avalon does

avalon simulates survival data from a wide range of hazard specifications — standard parametric distributions, flexible parametric (spline) models, fitted models, and fully user-defined hazard or log-hazard functions — with time-dependent effects, competing risks, multi-state structures, and left truncation. It is the workhorse the rest of the family is tested against: the known-truth data generator behind merlin, morgana, and pendragon's validation.

It is a complete rewrite, with a new syntax, of Michael Crowther's survsim package (no longer developed), and brings one simulation engine to both ecosystems under one name, so a project that spans R and Stata no longer needs a different simulation package in each. simsurv (Brilleman et al.) remains the established R option and is unaffected by this.

avalon is in active development.

Capabilities

Simulate almost any survival process — in Stata or R

avalon brings its simulation scope into one cross-ecosystem package. The capabilities below describe that target scope; the package is in active development.

DISTRIBUTIONS

Standard & flexible parametric

Exponential, Weibull, Gompertz, and Royston-Parmar / log-hazard spline baselines — or simulate from a fitted model.

USER-DEFINED

Custom hazards

Simulate from any user-supplied hazard or log-hazard function — no closed form required.

STRUCTURES

Competing risks & multi-state

Competing-risks and multi-state data, with time-dependent effects and left truncation.

ONE NAME, TWO ECOSYSTEMS

R + Stata parity

The same simulation API and behaviour in R and Stata.

Installation

Get started

avalon is in active development in both R and Stata, and is not yet on SSC or CRAN.

avalon is not released yet. Get in touch if you'd like early access.

Examples

A first model

avalon is in build. Both blocks show the intended interface.

Planned syntax. The blocks marked planned show the interface being built, not a command you can run today. They may change before release.

Rplanned
library(avalon)

# survival times from a Weibull model with a treatment effect,
# administratively censored at five years
d <- avalon(
  n = 1000,
  distribution = "weibull",
  lambda = 0.1, gamma = 1.2,
  covariates = list(trt = 0.5),
  maxtime = 5
)
Stataplanned
* survival times from a Weibull model with a treatment effect,
* administratively censored at five years
avalon stime died, distribution(weibull) lambda(0.1) gamma(1.2) ///
    covariates(trt 0.5) maxtime(5)
The merlin family

The simulation workhorse

avalon generates the data the rest of the family is tested against. merlin, morgana, and pendragon fit and predict; avalon simulates the known-truth data they are validated on.

Worked examples and tutorials for the family are in our Resources.

Try it in your browser: the survival DGM explorer and the multi-state explorer — choose a data-generating mechanism interactively, then export run-ready avalon code.

Cite

Citing avalon

avalon does not have a methods paper yet — cite the software itself.

@misc{avalon2026,
  author = {Crowther, Michael J.},
  title  = {{avalon: flexible simulation of survival data}},
  year   = {2026},
  url    = {https://reddooranalytics.se/software/avalon/},
  note   = {Red Door Analytics}
}

Designing a simulation study?

We use these tools daily for methods evaluation and study design. If you'd like help scoping a simulation study — or early access to avalon — get in touch.

Get in touch Start a project