SBMT: what works for whom, how. conceptual framework, design and analytical strategy. (A) Conceptual model for SBMT implementations. Well-being is used here in general to represent outcome variables assessed following implementation of mindfulness training (eg, risk of depression, social–emotional–behavioural functioning and well-being). (B) the MYRIAD trial design. Cohort 1: K=13 schools, cohort 2: K=72 schools. SBMT: K=43 schools; TAU: K=42 schools (1 school allocated to TAU dropped out after randomisation, and the baseline data for pupils from that school were not included in the trial because the school dropped out before the participating classes could be randomly selected for the trial). (C) Mixture model with a secondary auxiliary relationship. The joint model combines the measurement LP hierarchical mixture model and the auxiliary model, where the LP variable is a moderator of a mixed effects linear regression (which accounts for the clustering of observations and adjusts for the student/school-level covariates that are not included in the graph in order to simplify the representation). SDQ: social–emotional–behavioural functioning. CES-D: risk for depression. WEMWBS: well-being. All LP predictors were measured at baseline. (D) Two-stage instrumental variable model to examine the effects of the implementation variables on the primary outcomes, allowing for correlations between observations from the same school. Instruments were entered at the first stage as predictors of implementation. Confounders were introduced at the second stage. (E) Simple mediation path analysis model. The independent variable (X) is the trial arm status. The mediator (M) is (1) the CAMM (mindfulness skills) or (2) the BRIEF-2 (executive function) predifference–post difference, and the dependent variable is the 1-year follow-up measure of the corresponding primary outcome (Y), all measured at the student level. the model accounts for the clustering of observations and adjusts for student-level (U1) and school-level (U2) covariates. The product of a×b is the indirect effect through the independent variable (X) and mediator (‘I’ or ‘II’), after adjusting for the covariates. c' is the direct effect of the independent variable on the dependent variable after adjustment for the mediating effects and the covariates. BRIEF-2, Behaviour Rating Inventory of Executive Function-2; CAMM, Child–Adolescent Mindfulness Measure; CES-D, Center for Epidemiological Studies for Depression Scale; LP, latent profile; MT, mindfulness training; MYRIAD, My Resilience in Adolescence; SBMT, school-based mindfulness training; SDQ, Strengths and Difficulties Questionnaire; SEL ethos, school social–emotional learning ethos; TAU, teaching as usual; WEMWBS, Warwick-Edinburgh Mental Well-being Scale.