Statistical analyses
REGRESSION
Analyses were pre-specified in a statistical analysis plan (available at The intervention effect on weight at twelve months (and 95% confidence interval [CI]) was estimated from a random intercepts linear regression model, using measures of change in weight from baseline to four months and twelve months as outcomes. The model included intervention group, assessment timepoint, the interaction term for group by assessment timepoint, the randomisation stratifiers (sex, BMI classification), and baseline value of weight as fixed effects, and random intercepts to allow for the repeated measures on each individual. Individuals were included in the analysis in the group to which they were randomised. Secondary outcomes were analysed using the same approach as described for the primary outcome.Random intercept models use all available data and assume missing data are missing at random. To explore this assumption, we described baseline characteristics of participants with and without missing data on any outcome at twelve months. Because there were more missing values of weight in the intervention than in the standard advice group, we conducted a sensitivity analysis assuming data were missing not at random (MNAR) using pattern mixture models. Specifically, we imputed missing weight data using multiple imputation by chained equations (MICE). We then multiplied imputed values of weight by a varying factor (0% [MAR], or increasing or decreasing the values by 10%, 20%, 30%, [MNAR]) [Participants in the wait-list standard advice group were given access to the SWiM-C web platform after the four-month outcome assessment. We therefore conducted per-protocol analyses excluding standard advice participants who engaged with the intervention. We compared intervention participants who engaged with the SWiM-C intervention with standard advice participants who did not engage with the SWiM-C intervention to assess whether the findings were influenced by the degree of engagement with the intervention. We defined non-engagement with the intervention as accessing less than the first four sessions (participants were only able to proceed through sessions sequentially), since ACT-based content was introduced from session 4. We performed two per-protocol analyses of the primary outcome with two different levels of engagement: 1) comparing intervention participants who completed at least 4 SWiM-C sessions with standard advice participants who accessed less than 4 SWiM-C sessions, and 2) comparing intervention participants who completed at least 8 SWiM-C sessions with standard advice participants who accessed less than 4 SWiM-C sessions.To estimate baseline-adjusted differences between the study groups in change in weight from four months to twelve months, we used a linear regression model with change in weight from four months to twelve months as the outcome, and including baseline weight, four-month weight, the randomisation stratifiers (sex, BMI classification) and intervention group as covariates.Data were analysed using R version 4.0.0 and R Studio version 1.0.153.