Here is the design of a clinical trial:

Official Title: Parallel Group Randomized Controlled Trial on the Effect of a Smartphone-delivered Cognitive Behavioral Therapy for Insomnia on People With Major Depression and Insomnia

Included conditions:
- Sleep Initiation and Maintenance Disorders
- Depression

Study Armgroups:
- {'label': 'CBT-I condition', 'type': 'EXPERIMENTAL', 'description': 'Participants in the CBT-I condition start the 6-week CBT-I immediately after randomization, complete the post-intervention assessment right after they finish the treatment, and complete the follow-up assessment six weeks after the post-intervention assessment.', 'interventionNames': ['Behavioral: Cognitive Behavioral Therapy for Insomnia']}
- {'label': 'Waitlist control condition', 'type': 'OTHER', 'description': 'Participants in the waitlist control group complete the post-intervention assessment six weeks after the baseline assessment, start CBT-I (equivalent to that of the CBT-I group) immediately after completing the post-intervention assessment, and complete the follow-up assessment right after they finish the 6-week CBT-I.', 'interventionNames': ['Other: Waitlist Control']}

Interventions:
- {'type': 'BEHAVIORAL', 'name': 'Cognitive Behavioral Therapy for Insomnia', 'description': 'Immediate access to the self-help CBT-I treatment, content of which is based on the translated Chinese version of a well-established CBT-I treatment manual entitled "Insomnia: A Clinician\'s Guide to Assessment and Treatment". CBT-I aims at changing dysfunctional cognitive beliefs and maladaptive behaviors that contribute to the maintenance of insomnia. The self-help CBT-I treatment is delivered in Chinese language in six consecutive weekly modules via a smartphone application known as proACT-S. Duration of each module is around 45 to 60 minutes.', 'armGroupLabels': ['CBT-I condition']}
- {'type': 'OTHER', 'name': 'Waitlist Control', 'description': 'Delay access to the self-help CBT-I treatment.', 'armGroupLabels': ['Waitlist control condition']}

Primary Outcomes:
- {'measure': 'Changes over the measurement points in Center for Epidemiologic Studies Depression Scale', 'description': 'Measures the severity of depressive symptoms during the past week. Range from 0 to 60, where a higher value indicates more severe depressive symptoms.', 'timeFrame': 'Baseline, post-intervention: 6 weeks after CBT-I initiation, 6-week follow up'}
- {'measure': 'Changes over the measurement points in Insomnia Severity Index', 'description': 'Measures the severity of insomnia symptoms and the associated daytime impairment over the past two weeks. Range from 0 to 21, where a higher value indicates more severe insomnia symptoms.', 'timeFrame': 'Baseline, post-intervention: 6 weeks after CBT-I initiation, 6-week follow up'}
- {'measure': 'Changes over the measurement points in Pittsburgh Sleep Quality Index', 'description': 'Measures sleep quality and disturbances during the past month. It has seven components, namely, sleep quality, sleep latency, sleep duration, habitual sleep efficiency, sleep disturbance, use of hypnotics, and daytime dysfunction. Range from 0 to 21, where a higher value indicates poorer sleep quality.', 'timeFrame': 'Baseline, post-intervention: 6 weeks after CBT-I initiation, 6-week follow up'}

Please estimate the sample size based on the assumption: 
The study assumes an alpha value set at 0.05 (two-sided), 80% power, and an attrition rate of 30%. The sample size calculation is based on mixed ANCOVA using GPower 3.1, controlling for 12 covariates.
Sample size
        The most updated meta-analysis of 28 self-help CBT-I RCTs [19] showed a significant treatment effect in alleviating depressive symptoms (Hedgesâ gâ=â0.35) and insomnia symptoms (Hedgesâ gâ=â0.79). It also found that the mean cumulative study attrition rates were 21.25% (SDâ=â15.31%) and 18.4% (SDâ=â18.21%) in the treatment and the waiting list/routine care/no treatment/psychoeducation groups, respectively. Hence, a conservative small effect size (Cohenâs fâ=â0.2) and an attrition rate of 30% are estimated for the present study.
        The sample size calculation for each of the three primary outcomes (i.e., insomnia severity, poor sleep quality, and depression severity) is based on mixed ANCOVA using GPower 3.1. To conduct a 2 (condition: CBT-I versus waitlist control)âÃâ2 (assessment: baseline versus post-intervention) mixed ANCOVA with an alpha value set at 0.05, two-sided, 80% power to detect a small effect of 0.2 (Cohenâs f) between two groups while controlling for 12 covariates (demographics, clinical comorbidity, treatment expectancy, and acceptability of treatment), a total sample size of 199 will be required. In order to account for 30% attrition, a total sample of 285 participants will be sufficient to detect a small effect size (Cohenâs fâ=â0.2) for the difference in the change in each of the three primary outcomes (i.e., insomnia severity, poor sleep quality, and depression severity) from baseline to post-intervention between CBT-I condition and waitlist control condition with a two-sided 5% significance level and a power of 80%.