A unified framework for methods development and data analysis in Stata

Latest release: v2.4.0

merlin stands for Mixed Effects Regression for LInear, Non-linear and user-defined modelsmerlin has the capabilities to fit a linear regression or a Weibull survival model, a three-level logistic mixed effects model, or a multivariate joint model of multiple longitudinal outcomes (of different types) and a recurrent event and survival with non-linear effects… the list is rather endless. 


The latest stable version of merlin is available on the Statistical Software Components archive, and can be installed directly in Stata by typing:

ssc install merlin

Once installed, you can pick up any updates by typing:

ado update

Wrapper functions

Since merlin has the capability to fit a broad range of models, it can mean that the syntax can be tricky. To provide a more user-friendly way of accessing merlin‘s power, we have developed a range of wrapper functions, which provide a much simpler syntax for specific classes of models.

iceberg during daytime

Survival analysis made easy


Multilevel mixed effects parametric survival models

Training course at Lifetime Data Science conference 2023
I'm slightly (very) late in advertising this, but I will be at …
Flexible parametric survival analysis with frailty, take two
Hi everyone, Today we are going to continue learning about flexible parametric …
Biostatistics & Epidemiology Summer School returns!
I'm delighted to say that the Summer School on Modern Methods in …
Multivariate joint longitudinal-survival models
Joint longitudinal-survival models have been widely developed, but there are many avenues …


Crowther MJ. Simulating time-to-event data from parametric distributions, custom distributions, competing risk models and general multi-state models. The Stata Journal 2022; (Accepted).

Weibull CE, Lambert PC, Eloranta S, Andersson TML, Dickman PW, Crowther MJ. A multi-state model incorporating estimation of excess hazards and multiple time scales. Statistics in Medicine 2021;40(9):2139-2154.

Crowther MJmerlin – a unified framework for data analysis and methods development in Stata. The Stata Journal 2020;20(4):763-784.

Red Door Analytics AB is a registered company in Sweden

CEO: Michael Crowther
Org. number: 559351-8359

Terms & Conditions | Privacy Policy