## 6 Conclusions and Future Work
Formal statistical tests may be required for checking the plausibility of this assumption and a model-robust inference may be necessary at the analysis stage. We designate this as an important problem and defer it to the future work. Second, the formulation of a model adequately describing the relationship between the primary endpoint, treatment, engagement, and possibly other factors is a major problem in itself. It will depend on the disease area, the target patient population, the mechanism of action of an experimental therapy, etc. Product developers and clinical investigators should work closely with statisticians to build scientifically sound models and test/validate them in carefully designed experiments. These considerations merit further investigation, but they are beyond the scope of the present work. We would like to conclude this paper by outlining some directions for future research. In the present work, we considered engagement as a covariate, and it was assumed to be measured without error. All estimates, standard errors, tests of hypotheses, and confidence and prediction intervals were obtained based on this assumption. Technically, since data on engagement is acquired after randomization, it is affected by treatment and should be regarded as a response. If we regard both engagement (\(X\)) and response (\(\gamma\)) as random variables, then different approaches to inference, such as error-in-variables regression models [16; 17] should be considered. As one of the reviewers pointed out, it may be more appropriate to discuss patient engagement in the context of mediation analysis instead of covariate adjustment. An approach to mediation analysis when a continuous mediator is measured with error and the outcome follows a generalized linear model was described in the reference [18]. This approach may be also useful in the RCTs of digital mental health interventions, and we defer this to the future work. Another important extension of the present work is the investigation of more complex statistical models defining the links among treatment, engagement, response, and possibly other factors. For instance, longitudinal models with repeated measurements at multiple visits, nonlinear models, and models with more than one covariate may provide more accurate descriptions of the phenomena of interest. Multiple ingredients of a CBT (individually or in combination) may have an impact on the response, which should be accounted for in both the design and the analysis. One recent paper [9] investigated the relationship between patient engagement and depressive symptoms among people with HIV based on data from a 3- month RCT comparing an mHealth intervention versus a wait-list control group. The authors used latent growth curve models to link patient engagement and depressive symptoms at multiple time points, up to 3 months of the mHealth intervention. Such an approach holds promise and warrants further consideration. In our work, we assumed engagement is measured for subjects in the experimental group but not in the control group. However, in many settings the engagement is observed in both experimental and control groups; e.g., one may have the control app as \"mindfulnessonly\", whereas the experimental app may be \"mindfulness + diet + weight loss\". In this case, engagement is measurable in both groups, and different modeling strategies have to be considered. Recently, machine learning techniques have been applied to understand patterns of engagement with internet-delivered CBTs [19]. These approaches can help identify different subtypes of patients that engage differentially with the digital interventions, and this may enable more personalized approaches to treatment. Incorporating machine learning tools in the design and analysis of RCTs of dCBTs seems to be a valuable approach that merits further investigation. Conceptualization: O.S. and Y.R. ; methodology: O.S. and Y.R. ; software: Y.R. ; validation: O.S. ; writing--original draft preparation: O.S. ; writing--review and editing: O.S. and Y.R.