Here is the design of a clinical trial:

Official Title: "Eficacia de la Terapia de activación Conductual Para Pacientes Con Dolor crónico: Ensayo clínico Randomizado"

Included conditions:
- Fibromyalgia
- Depression

Study Armgroups:
- {'label': 'Behavioral activation group', 'type': 'EXPERIMENTAL', 'description': 'This group will receive usual care for fibromyalgia with comorbid major depression plus in-group behavioral activation.', 'interventionNames': ['Behavioral: Behavioral activation', 'Other: Usual care']}
- {'label': 'Usual care', 'type': 'OTHER', 'description': 'This group of participants will only receive usual care for fibromyalgia with comorbid depression.\n\nParticipants will be attended by a Medical Doctor that has a high level of expertise in fibromyalgia (rheumatologist or chronic pain specialist) of the Red Salud Christus, the most important private medical care network in Chile. In this clinic treatment of fibromyalgia includes administering pregabalin and pain killers (avoiding opioids). I addition, muscle relaxant such as cyclobenzaprine can be also administered. In a high proportion of cases (around 42%), antidepressant with analgesic properties, namely duloxetine, is prescribed. In addition, usual care includes derivation to psychiatrist if needed.', 'interventionNames': ['Other: Usual care']}

Interventions:
- {'type': 'BEHAVIORAL', 'name': 'Behavioral activation', 'description': 'The Brief Behavioral Activation Treatment for Depression (Lejuez, Hopko, Acierno, Daughters, \\& Pagoto, 2011; Lejuez, Hopko, LePage, Hopko, and McNeil; 2001) will be used. It aims are (1) to increase engagement with activities associated with pleasure or mastery experiences; (2) decrease engagement with activities that maintain or increase the risk of depression; (3) and remove the barriers that limit the access to gratification. The sessions of therapy are well structured and described in its manual. The protocol was originally designed to be applied individually. However, for the present research, it will be adjusted to be applied in group sessions (5-8 participants). Materials will be also adjusted to be use with Chilean population. Treatment core aspects will not be altered. The treatment will last 10 sessions over two months. Two psychologist trained in behavioral activation will lead the sessions.', 'armGroupLabels': ['Behavioral activation group'], 'otherNames': ['Brief behavioral activation for depression']}
- {'type': 'OTHER', 'name': 'Usual care', 'description': 'Participants will be attended by a Medical Doctor that has a high level of expertise in fibromyalgia (rheumatologist or chronic pain specialist) at the Red Salud Christus, the most important private medical care network in Chile. In this clinic the protocol for the treatment of fibromyalgia includes administering pregabalin or gabapentin and pain killer (avoiding opioids). I addition, muscle relaxant such as cyclobenzaprine can be also administered to improve sleep quality. In a high proportion of cases (around 42%), antidepressant with analgesic properties, namely duloxetine, is prescribed. In addition, usual care includes derivation to psychiatrist if needed.', 'armGroupLabels': ['Behavioral activation group', 'Usual care']}

Primary Outcomes:
- {'measure': 'Changes in depressive symptoms severity', 'description': 'Patients Health Questionnaire-9 (PHQ-9; Baader et al., 2008). It consists of 9 items evaluating the presence of depressive symptoms in the last two weeks. Its psychometric properties have been examined in Chilean population. It shows a sensitivity of 92% and specificity of 89%. Item response options are: 0 = never, 1 = some days, 2 = more than half the days and 3 = almost every day. Patients can be classified in:\n\nMajor depressive syndrome: presence of 5 or more of the 9 depressive symptoms with an index of severity of more than half of the days, and one of the symptoms is mood depressive or anhedonia.\n\nOther depressive syndrome: presence of 2, 3 or 4 depressive symptoms for more of half the days and one of the symptoms is depressive mood or anhedonia.\n\nPositive depressive symptoms: presence of at least one or two of the symptoms depressive, but fails to complete the above criteria.\n\nNegative depressive symptoms: does not present any diagnostic criteria more than half of the days.', 'timeFrame': 'Depressive symptoms will be assessed four times: at baseline, during treatment (one month after the start of the treatment), immediately after the treatment, and at three month follow up. As such the participant will be assessed during five months.'}

Please estimate the sample size based on the assumption: 
The study aimed for a power of 0.80. The correlation between the intercept and the slope was specified to be -0.4. The variances of the intercept, slope, and scores of all variables were specified as 1. The correlation between treatment and each covariate was specified as 0.1, and the correlation between covariates was specified as 0.3.
Sample size calculation
          The study sample size was calculated for a Hierarchical Linear Model (HLM) in which the primary outcome (depressive symptom severity) was the dependent variable. Using Mplus [20], we determined that a sample of 90 participants will be needed to reach a power of .80. In this power analysis, the correlation between the intercept and the slope was specified to be ââ0.4. The average slope was assumed to be negative, as depression scores are expected to drop, and was specified as ââ0.5. To simplify the model, the variances of the intercept, slope, and scores of all the variables in the model (depressive symptom severity, and covariates) were specified as 1, so as to have the standardized model solution. The treatment effect on the slope (standardized Beta) was specified as 0.45. This corresponds to a medium-to-large effect size [21, 22]. In addition, the effect of two covariates was included. The effect of each of the covariates on the slope was specified as 0.1. The correlation between treatment and each covariate was specified as 0.1, and the correlation between covariates was specified as 0.3.