Red Door Analytics
Interactive tools

Eight tools, four jobs

Free, fully client-side tools that run in your browser and export to R and Stata. They divide by what you need to do — the full index gives each one a card.

Understand

Move something and watch what it does.

Plan

Work out what the study needs, before you have data.

Specify

Turn the decision into code you can run.

Deliver

Produce something you can put in a submission.

All 8 tools →

Software documentation

Docs and worked examples

Start here for hands-on material — installation, function reference, and runnable examples.

MERLIN

merlin for R

The R package: source, the function reference that ships with it, and the issue tracker. View on GitHub →

MERLIN

merlin for Stata

The Stata package: source, the issue tracker, and the development roadmap. View on GitHub →

SOFTWARE

Software hub

An overview of merlin, multistate, and survsim, and guidance on which to use. Browse the software →

Tutorials

Worked examples and methods notes

Reproducible worked examples on the methods we teach — survival, joint, multistate, competing-risks, and frailty modelling.

TUTORIALMultistate

multistate v4.4.0: semi-parametric multi-state modelling

predictms now supports the Cox model as a transition model via merlin or stmerlin, with predictions from a multi-state Cox model implemented through a simulation approach.

Open resource →
TUTORIALSimulation

Simulating survival data with a continuous time-varying covariate…the right way

How to simulate survival data with a continuous, time-varying covariate for evaluating joint longitudinal-survival models, using the survsim and merlin commands.

Open resource →
TUTORIALInterval censoring

Survival analysis with interval censoring

Handling time-to-event data where only the interval containing the event is known — as in ophthalmology and dentistry, where events are detected at scheduled appointments.

Open resource →
TUTORIALRelative survival

Relative survival analysis

Relative survival models, used predominantly in population-based cancer epidemiology to quantify excess mortality against a matched reference population.

Open resource →
TUTORIALFrailty

Flexible parametric survival analysis with frailty

Incorporating frailty (random intercepts) into flexible parametric survival models using Stata's merlin command and the stmixed wrapper.

Open resource →
TUTORIALCustom hazard

A user-defined / custom hazard model

Showcasing merlin's capability to fit survival models with a general user-specified hazard function via numerical integration.

Open resource →
TUTORIALJoint models

An introduction to joint modelling of longitudinal and survival data

An introductory guide to joint models linking repeatedly measured outcomes with time-to-event data through shared random effects, or functions of them.

Open resource →
TUTORIALJoint models

Multivariate joint longitudinal-survival models

Extending joint models to handle multiple continuous longitudinal outcomes modelled jointly with a survival outcome.

Open resource →
TUTORIALJoint models

Joint longitudinal-survival models with time-dependent effects

Modelling time-dependent (non-proportional hazards) effects within a joint longitudinal-survival framework.

Open resource →
TUTORIALCompeting risks

Joint longitudinal and competing risks models

Extending joint longitudinal-survival models to incorporate competing risks — simulation, estimation, and prediction.

Open resource →
TUTORIALRecurrent events

Joint frailty models for recurrent and terminal events

Joint frailty models for analysing recurrent events alongside a terminal event, with interpretation guidance using merlin.

Open resource →
TUTORIALNon-linear effects

Simulation, modelling and prediction with a non-linear covariate effect

Simulating, fitting, and predicting survival outcomes when a covariate has a non-linear effect on survival.

Open resource →
TUTORIALMeta-analysis

Three-level survival models: IPD meta-analysis of recurrent events

Simulation and estimation of three-level survival models for clustered, recurrent-event data in an individual patient data meta-analysis.

Open resource →
TUTORIALSensitivity analysis

Probabilistic sensitivity analysis and survival models

Implementing probabilistic sensitivity analysis in survival-analysis contexts — relevant for health-economic modelling.

Open resource →
TUTORIALMultistate

Defining a transition matrix for multi-state modelling

Building custom transition matrices for the multistate package, which govern how a process moves between its possible states.

Open resource →
TUTORIALFirst model

Fitting your first model in merlin

The same Weibull model fitted twice, in streg and in merlin, so you can see which parts of the output are identical, which are only presented differently, and why the two log-likelihoods are not the same number.

Open resource →
TUTORIALCompeting risks

Competing risks in merlin

Two cause-specific models in one command — the second set of brackets — and the arithmetic that shows they are the same two models you would have fitted separately.

Open resource →

Need a worked example for your problem?

We keep reproducible code for most of the methods we teach. Tell us what you're modelling and we'll point you to the closest example — or build one.

Get in touch Start a project