The file R2repmaterials_v2.rar contains guidance and materials for fully replicating the empirical examples in the article in Stata. We also provide working R code for the first example using the user-written R package 'brms'.
Note: There now exists a user-written program in Stata that directly implements the approach described in this paper: See https://github.com/benjann/twolevelr2.