merlin tutorials in Stata

This page contains a collection of worked examples using the merlin Stata package. Examples are loosely grouped into areas, and may appear in more than one area.

Type help merlin to access the main help file, which documents all the available commands and options.

If you have an example you’d like to contribute, then please get in touch.

$~$

Tutorials

Each tutorial below is tagged to illustrate the level of completeness, as follows:

  • [Tutorial] - a completed page, with code and full worked example
  • [Draft] - still in draft, contains code but not fully documented
  • [Code only] - example code only, minimal description
  • [Sim] - example shows how to simulate data from the illustrated model
  • [TBA] - to be added
  • [EG] - indicates that the tutorial shows how to fit an example from the literature within the merlin framework

$~$

Survival (time-to-event) analysis


$~$

Longitudinal (hierarchical) analysis


$~$

Joint frailty models for recurrent and terminal events


$~$

Joint longitudinal-survival models


$~$

Relative survival analysis


  • An introduction to relative survival with merlin [Draft]
  • Relative survival model with a random intercept [TBA]
  • Relative survival model with a random coefficients [TBA]
  • General level relative survival model [TBA]
  • General level relative survival model with time-dependent effects [TBA]

$~$

Non-linear mixed effect models


  • An exponential decay model [TBA]

$~$

Meta-analysis


$~$

Cost-effectiveness modelling


  • A Gamma random effects model for costs [TBA]
  • A two-part mixed effects model for costs [TBA, EG]
  • A bivariate model for costs and utilities [TBA, EG]

$~$

Miscellaneous


$~$

External examples


$~$

Related

comments powered by Disqus