Major depressive disorder (MDD) is a condition with high prevalence and morbidity worldwide [1]. Pharmacotherapy and psychotherapy have limited efficacy and are curbed by adverse effects [2], availability, and costs [3]. Thus, developing novel interventions is tremendously relevant and can bring major gains in psychiatric care.

Non-invasive brain stimulation (NIBS) approaches, such as transcranial direct current stimulation (tDCS) and magnetic stimulation use electrical currents or magnetic fields to modulate neural networks for ultimately restoring or enhancing brain function [4]. The latter is an effective treatment for MDD [5], but limited considering costs, availability, and a small risk of seizures [6]. By contrast, tDCS is an appealing intervention due to its safety profile, portability, ease of use, and affordability [4, 7, 8]; although clinical results have been mixed according to large randomized clinical trials [9,10,11] and recent meta-analyses [12, 13].

TDCS employs an electric current of low intensity that stimulates the cortex via electrodes placed over the scalp [14]. Its effects are mainly polarity-dependent, i.e., anodal and cathodal tDCS respectively increases and decreases cortical excitability, although other parameters, such as intensity and session duration also play major roles in determining the net effect [14]. MDD is associated with the dysfunction of several cognitive and emotional large-scale networks that contain dorsolateral prefrontal cortex (DLPFC) nodes [15]. In addition, a recent study based on focal lesion location in MDD showed that lesions mapped to a connected brain circuit centered in the left DLPFC [16] and increases in DLPFC activity have been associated with antidepressant response [17]. Although the antidepressant mechanisms of tDCS have not been completely described, it is supposed that stimulation of several networks that include DLPFC nodes could modify their activity and improve depressive symptoms.

Understanding the variability of tDCS antidepressant effects could be helpful to advance the field by identifying response trajectories according to subgroups and their specific response predictors. For instance, using data from a large repetitive transcranial magnetic stimulation (rTMS) trial [18], Kaster et al. [19] identified four rTMS trajectory groups and associated baseline features. Similar approaches have been used in psychotherapy and pharmacotherapy [20, 21]. However, to the best of our knowledge, such an approach has not been employed in tDCS clinical trials for MDD yet. In addition, Kaster et al. did not compare rTMS findings with pharmacotherapy or placebo responses, which would be helpful to disentangle the specific vs. nonspecific effects of antidepressant response among different interventions and over time.

Therefore, we applied group-based trajectory modeling techniques to perform an exploratory study using data from the Escitalopram versus Electrical Current Therapy for Treating Depression Clinical Study (ELECT-TDCS) [9]. Based on the recent Kaster et al. study, our pre-specified (primary) objectives were twofold: (1) to describe the number and pattern of distinct within-group longitudinal response trajectories; and (2) to assess whether assignments to specific trajectory classes varied between interventions. Here, we do not present our aims using null and alternative hypotheses since these aims were essentially descriptive and not comparative. Secondary objectives were: (3) to evaluate whether clinical predictors previously described in NIBS and pharmacotherapy studies were associated with each trajectory and (4) to identify potential new predictors of response using a manifold of collected clinical variables, in a data-driven approach. Likewise, no null and alternative hypotheses are presented since these objectives are based on dependent variables that were only identified at aim (1).

Materials and methods


This is an ancillary analysis of ELECT-TDCS, a randomized, non-inferiority, double-blinded trial, in which 245 patients with major depression were randomized into three groups: sham tDCS—placebo pill (placebo, N = 60), sham tDCS—escitalopram 20 mg/day (escitalopram, N = 91), and active tDCS (22 tDCS sessions, 2 mA, 30-min sessions, with anode over the left and cathode over the right DLPFC)—placebo pill (tDCS, N = 94) over a 10-week treatment period (Table 1). The study was approved by the local and national ethics committee and registered at (NCT01894815). All participants signed informed consent forms and were recruited at the University Hospital and at the Institute of Psychiatry, two teaching hospitals from the University of São Paulo.

Table 1 Baseline characteristics of patients receiving tDCS + placebo, escitalopram + sham tDCS, and placebo + sham tDCS for depression, by symptom trajectory class.

Interventions and eligibility criteria are described in the Supplementary Materials and Methods and elsewhere [9, 22]. Briefly, eligible participants were between 18 and 75 years of age and presented an acute unipolar, nonpsychotic, depressive episode. Benzodiazepines were tolerated, although tapered down to a maximum dose of 20 mg/day diazepam-equivalent, if necessary. “Z-drugs” (i.e., nonbenzodiazepine drugs that are GABA-A receptor agonists, such as zolpidem, zaleplon, and zopiclone) were also tolerated. In addition, all patients had been escitalopram-naïve, and were not using antidepressant drugs at least 2–5 weeks before trial onset. A total of 22 tDCS sessions were performed. The first 15 sessions took place daily, except for weekends, and the remaining seven sessions took place once a week. For sham tDCS, the devices turned off automatically after 30 s of stimulation, mimicking the skin sensations of active stimulation. During the first 3 weeks, participants received 10 mg/day of escitalopram or placebo pill, and later 20 mg/day for the next 7 weeks. The main study findings showed that tDCS was not non-inferior to escitalopram, with further analyses showing that tDCS and escitalopram were superior to placebo and that escitalopram was superior to tDCS. All interventions were well tolerated.


Trained, board-certified psychologists or psychiatrists performed a comprehensive, structured clinical and neuropsychological assessment. Hamilton Depression Rating Scales (HAM-D-17) scores were evaluated at baseline, and weeks 1, 2, 3, 6, 8, and 10 (endpoint). Baseline information included socio-demographic, neuropsychological, treatment-related, and rating-scale variables, such as the Inventory of Temperament and Character (Cloninger) [23], Positive and Negative Affect Scale [24], State-Trait Anxiety Inventory [25], and the HAM-D, Montgomery-Asberg (MADRS) and Beck (BDI) [25]. Treatment-resistant depression (TRD) was defined as the lack of clinical response after at least two adequate treatment trials with antidepressant drugs from different classes in the current depressive episode [26].

Statistical analysis

All statistical analyses were performed in R, version 3.6.3 [27]. Data can be obtained upon reasonable request. Associations were considered significant at α = 0.05. For each objective, models were controlled for the false discovery rate (FDR) [28].

Describing clinical trajectories within each group

For our first objective, we applied latent class linear mixed models (LCLMM), also known as growth mixture models, using the R package lcmm [29]. The LCLMM consists in assuming that the population is divided in a finite number of latent classes. Each latent class was characterized by a specific trajectory relative to the change of other patients within the treatment arm modeled by a class-specific linear mixed model [29,30,31]. The optimal number of trajectories and optimal polynomial degree were determined using the improvement in model fit. To decide between more and less complex models, BIC log Bayes factor approximation was employed (Supplementary Material). The maximum degree of the fitted polynomial was fixed at cubic, as symptomatic decrease during antidepressant treatment usually follows linear, quadratic, or cubic trajectories [21, 32]. The combination of assumed number of distinct groups and polynomial degree that best and most parsimoniously explained the observed trajectories (lowest BIC) was selected as the final model.

Class-specific model fit was assessed by calculating posterior probabilities of being assigned to each trajectory class and by calculating the odds of correct classification (OCC). An average of the maximum posterior probability of assignments (APPA) above 70%, in all classes, and OCC > 5 are regarded as acceptable [33]. To ensure clinical meaningfulness of the trajectory patterns, classes had to capture a minimum of 5% of the patients within the respective treatment arm. Finally, categorical comparisons of response (≥50% reduction from baseline in HAM-D score) and remission (HAM-D score ≤7) rates at each measurement until study endpoint within each treatment arm were obtained to assess whether and when the trajectories clinically discriminated (Supplementary Material).

Comparing class assignment rates between treatment groups

To enable comparisons of allocation to the obtained trajectories between treatment groups, the whole sample was parsed into classes of rapid, slow, and no/minimal improvement using the same statistical approach abovementioned, but this time relative to patients from all treatment groups instead of relative to the patients who received the same treatment. Trajectory membership was modeled using χ2 likelihood ratio tests comparing nested multinomial logistic regression models adjusted for baseline depression severity with and without treatment group as the dependent variable.

Top-down clinical predictor (hypothesis-driven) analyses

For this aim, we used multinomial logistic regressions weighted by the patient-specific class probability assignment. Candidate predictors were selected based on recent meta-analyses [12, 13] and rTMS studies [19] and included TRD, age, anxiety, benzodiazepine use, and depression severity.

Bottom-up clinical predictor (data-driven) analyses

We explored potential novel predictors of response using a data-driven approach that included all available clinical information from the trial (k = 51 predictors), such as syndrome-specific rating scales (TCI, MADRS, BDI), and also demographic and clinical variables. To avoid issues related to large numbers of predictors and multicollinearity, we performed a stability ranking procedure [34] in combination with elastic net regularization [35]. It was chosen to rank predictors by their capacity to classify patients regarding trajectory class membership while penalizing correlations between them. While other approaches for high numbers of predictors have been heavily criticized for overfitting the data (e.g., stepwise regression, selection based on the significance of univariate correlation) [36], this procedure makes the selection process more reliable by adding resampling (1000 iterations of threefold cross-validation) to the variable selection, hence avoiding fitting only one model but fitting many different ones on subsets. Finally, to avoid circularity, no inferential analysis (confirmatory modeling) of the identified associations was applied. Instead, the predictors are presented ranked by their selection stability to provide points of reference in the planning of future confirmatory studies. As proxies for relevance and directionality of effects, we supplied each feature’s selection probability across the hyperparameter space and log-odds with 99.9% confidence intervals (i.e., adjusted for the total number of predictors), respectively. (Supplementary Material).


Within-group trajectories

The latent class models showed that, for each group, observed symptom reduction was best explained by three distinct trajectory classes and degrees of improvement, with combinations of linear and quadratic polynomials, which were labeled no/minimal improvement (minimal improvement or even deterioration), slow improvement (slow onset and gradual improvement until endpoint), and rapid improvement (important initial reduction with further follow-up improvements) (Fig. 1a, b, Tables 1, 2, and S1 for additional information). Models had adequate overall and class-specific fit, with APPAs >0.85 and OCCs >5.5 (Tables S25).

Fig. 1: Distinct trajectories of change in depressive symptoms over 10 weeks of treatment with tDCS + placebo, escitalopram + sham tDCS, and placebo + sham tDCS.
figure 1

a HAM-D score change in latent trajectories relative to patients within the same treatment group until week 10; error bars represent ±1 standard error (b) distribution of trajectory classes within each treatment arm (c) HAM-D score change in latent trajectories relative to patients from all treatment groups (d) comparing distributions of trajectory classes between treatment arms; Trajectory classes were determined using growth mixture modeling; optimal combinations of class number and polynomial degree were determined using log Bayes factor approximation >10 as criterion for favouring a more complex model. (Figure embedded for readability, source files submitted separately).

Table 2 Change in Bayesian information criterion (BIC) with increasing number of distinct trajectory classes fixed at quadratic polynomial in patients treated with tDCS + placebo, escitalopram + sham tDCS, and placebo + sham tDCS over 10 weeks.

For escitalopram, an additional fourth class, labeled delayed improvement, was characterized by improvement only after 3 weeks of treatment, possibly due to escitalopram dose increasing. However, this class did not capture 5% of patients and thus did not satisfy criteria for clinical relevance, being not included in further analyses.

Statistically significant differences in treatment response were observed as early as week 1 for tDCS and escitalopram, and by week 2 for placebo. Differences in remission rates were significant at week 1 for tDCS, week 2 for escitalopram, and week 3 for placebo. These differences were maintained until study endpoint (Table S6).

Between-group comparisons

Patient allocation to the clinically relevant trajectory class distributions (i.e., with a minimum capture of 5% of the patients within the respective treatment arm), differed significantly between treatment groups (χ24 = 20.09, p < 0.001) (Fig. 1c, d).

For escitalopram vs. placebo, FDR-corrected analyses showed that more patients in the escitalopram group were assigned to rapid improvement (45 vs. 23.3%, OR = 2.69, 95% CI = 1.33–5.71) and fewer were assigned to no/minimal improvement (7.7 vs. 33.3%, OR = 0.17, 95% CI = 0.06–0.41). In addition, for escitalopram vs. tDCS, FDR-corrected analysis showed that fewer escitalopram patients were assigned to no/minimal improvement (45 vs. 38.3%, OR = 0.22, 95% CI = 0.08–0.51). Finally, for tDCS vs. placebo, uncorrected analysis showed that numerically, more tDCS patients were assigned to rapid improvement (38.3 vs. 23.3%, OR = 0.49, 95% CI = 0.23–1); however, this result was not significant.

Other pairwise comparisons were not significant (Table 3).

Table 3 Between treatment comparison of distinct trajectory class distributions of patients treated with tDCS + placebo, escitalopram + sham tDCS, and placebo + sham tDCS over 10 weeks.

Clinical predictors (hypothesis-driven approach)

Multinomial logistic regressions were performed to predict trajectory class membership within each treatment group. Hosmer–Lemeshow tests indicated adequate model fit of multinomial regression models in all groups (Table S7) [37, 38]. For tDCS, benzodiazepine users were less likely to show rapid compared to slow improvement (OR = 0.21, 95% CI = 0.06–0.73) (Table 4), while older patients were more likely to show rapid than no/minimal improvement (OR = 1.07, 95% CI = 1.01–1.13). Higher depression severity was associated with no/minimal compared to slow and rapid improvement (respectively, OR = 1.25, 95% CI = 1.07–1.46; OR = 1.28, 95% CI = 1.07–1.52).

Table 4 Top-down selected baseline variables associated with trajectory class membership for patients treated with tDCS + placebo, escitalopram + sham tDCS, and placebo + sham tDCS.

For escitalopram, no statistically significant top-down predictors were identified.

For placebo, use of benzodiazepines and higher anxiety were top-down predictors for showing no/minimal compared to slow improvement (respectively, OR = 33.65, 95% CI = 3.98–284.23; OR = 1.24, 95% CI = 1.04–1.49). Anxiety was a significant predictor for showing no/minimal compared to rapid improvement (OR = 1.30, 95% CI = 1.08–1.56) (Table 4).

Clinical predictors (data-driven approach)

Figure S1 shows the variable ranking from all elastic net iterations. Results of the data-driven predictor identification should not be interpreted as confirmatory but as a point of reference for future study designs for testing moderators of treatment response. For tDCS, features selected with a high stability included depression scales (MADRS, BDI), trait anxiety, and z-drugs, which were numerically associated with no/minimal over rapid and over slow improvement, negative affect, which was associated with no/minimal and slow over rapid improvement, as well as age of depression onset where younger age was associated with no/minimal over slow and slow over rapid improvement.

For escitalopram, MADRS scores were most stably selected showing numerical associations with no/minimal and slow over rapid improvement, respectively. The next most selected features included performance on psychometric tests (trail-making test and digit-span test) and dimensional scores from the TCI (novelty seeking and reward dependence) as well as positive affect, which were numerically associated with rapid and slow over no/minimal and rapid over slow improvement.

For placebo, MADRS was most stably selected and numerically associated with no/minimal and slow over rapid improvement. State anxiety, smoking, and demographic characteristics (being unemployed, not being married), and worse performance on cognitive measures (trail-making test and digit-span test) were numerically associated with rapid and slow over no/minimal and rapid over slow improvement.


In the present study, we have described depression improvement trajectories and predictors using data from the ELECT-TDCS trial that randomized participants to receive tDCS, escitalopram, or placebo over a 10-week course treatment. Main findings are discussed below.

Distinct trajectories of response were identified at each treatment group

Distinct within-treatment, clinically relevant trajectories were evident within the first 3 weeks of treatment. According to the intensity and celerity of improvement, they were identified as “no/minimal”, “slow”, and “rapid” improvement trajectories. We found that 43.6% of patients receiving tDCS showed a pattern of rapid improvement, being evident as early as week 1; whereas previous, group-level based analyses suggested that tDCS would present effects only after the acute treatment phase [9]. In fact, such delayed effects seem to occur for no/minimal (23.4%) and slow (33%) improvers. These findings suggest that early effects might be observed in several patients, which is relevant considering that home-use tDCS strategies are being researched to reduce the burden of daily visits to the clinical center. Prospective sham-controlled studies could evaluate the minimum number of sessions necessary to achieve a sustained treatment effect.

For pharmacotherapy, the identification of distinct rapid and slow improvement trajectories is in agreement with prior trajectory analyses [39] and psychotherapy [20]. In addition, a “delayed improvement” class was described for escitalopram. Although the limited number of patients assigned to this category was too low for further analyses and relevance, we opted to depict it in Fig. 1 as it presents a distinct trajectory that could be explained by the dose increase (10–20 mg/day) that occurred after 3 weeks of treatment in ELECT-TDCS.

Between-group comparisons

Our between treatment analyses distinguished three different membership trajectories. Overall, the findings from the main trial [9] that showed faster, larger effects of escitalopram vs. tDCS and vs. placebo were generally reproduced in this ancillary study: whereas only a minority of escitalopram patients presented no/minimal improvement (7.7%) compared to those receiving tDCS (27.7%) and placebo (33.3%); almost half of escitalopram patients present rapid improvement (45.1%) compared to tDCS (38.3%) and placebo (23.3%).

By contrast, although there were numerically more tDCS patients assigned to rapid improvement compared to placebo; these comparisons were not statistically significant. This partly reflects our previous findings [9]: on one hand, the superiority of tDCS over placebo could not be demonstrated in the present analysis as in the main study; on the other hand, that study showed evident effects of tDCS over placebo only after 6–8 treatment weeks. Such delayed response has also been observed in previous studies [40, 41] and highlight the need of enhancing early tDCS response; for instance, by combining tDCS with pharmacological [11] or non-pharmacological interventions [42] and/or by identifying trajectories and associated predictors, as in the present study.

Hypothesis- and data-driven approaches for identifying predictors of response

Hypothesis-driven predictors showed that use of benzodiazepines (even limited to 20 mg/day of diazepam-equivalent) was associated with worse improvement. This had already been suggested in previous trials [11, 43] and individual patient data meta-analysis [44]. Benzodiazepine users also showed poorer outcomes in rTMS trials [19, 45]. Similarly to rTMS, tDCS is a neuromodulatory therapy which may produce its effects through changes in motor cortical excitability [4] that are decreased with benzodiazepines [46, 47].

Higher depression severity and baseline anxiety predicted worse response. Interestingly, older age was a predictor for rapid improvement for tDCS, which, to the best of our knowledge, has not been reported yet. However, the same association of age with rapid response has been found for rTMS trajectory analyses [19].

Our exploratory findings are important for future studies because: (1) as benzodiazepine use is a modifiable variable, researchers could consider their use as an exclusion criterion when feasible; alternatively, this variable should be at least systematically collected in clinical trials; and (2) other predictors associated with better response included non-severe, non-refractory cases and patients without comorbid anxiety. Future trials could be designed for this subgroup of patients, in which tDCS benefit was suggested to be higher.

The assessment of placebo trajectories and respective predictors allowed us to perform comparisons with the findings in the active treatment groups. Particularly, variables, such as benzodiazepine use, higher baseline depression, and anxiety predicted no/minimal improvement, which could indicate that these variables are proxies of general lower depression response regardless of the intervention. Interestingly, we also observed that some of these variables were associated with different tDCS trajectories. Taken together, these findings indicate that these predictors could have both specific and nonspecific effects in tDCS response, highlighting the need for further exploration in prospective studies.

Whereas abovementioned results used predictors already described in literature, data-driven analyses explored several potential novel predictors that can be investigated in future studies. Nonetheless, we underscore that these results should not be interpreted as confirmatory but merely as a point of reference for subsequent investigations designed for testing moderators of treatment response. For instance, use of z-drugs was associated with no/minimal improvement in tDCS trajectories. Interestingly, z-drugs bind to the same receptors (GABAA) and share a similar activity profile as benzodiazepines [48]. Other predictors, such as negative affect and trait anxiety had already been identified in a previous study, as discussed below [49].

Findings from previous studies

In a previous study using the same dataset, we predicted response to tDCS vs. escitalopram using machine-learning algorithms [49]. Similar to the present findings, the set and influence of baseline features predicting each treatment was different: main features associated with tDCS response were negative affect, number of depressive episodes and positive affect. These features appear to be most predictive for dichotomous classifications of response vs. non-response and when comparing patients from distinct trajectories with each other (e.g., negative affect is among the two most discriminative features when comparing rapid and slow improvement, see Fig. S1). However, other predictors such as benzodiazepine use were not important features in our previous study. These discrepant findings could be explained by methodological differences (for instance, the machine-learning tree-boosting algorithms select a value of a variable to split the data and minimize the impurity of the resulting data bins, making binary variables less likely to be selected by these models, as they can only be split in one place [50]). Taken together, our previous study showed that a clinically based algorithm could classify treatment response beyond chance and that features predicting tDCS and escitalopram response were different. However, overall accuracy was low and the machine-learning approach is limited in inferring causality. Therefore, the present study adds new findings by showing differences in trajectory response within and between treatments, and identifying hypothesis-driven clinical predictors.

In another group-based trajectory modeling strategy, Kaster et al. [19] identified four rTMS trajectories, namely non-responders, rapid responders, and linear responders with higher and lower baseline symptoms. The main trials from which the analyses were conducted (ELECT-TDCS [9] and THREE-D [18]) were markedly different in terms of design (absence of placebo arm in THREE-D), sample selection (higher refractoriness and concurrent antidepressant use in THREE-D), and DLPFC localization (neuronavigated in THREE-D). In addition, although we employed a similar trajectory-based approach than Kaster et al., they collapsed both study groups in a single arm, whereas we used the same groups as in ELECT-TDCS. Such differences might explain the distinct trajectories observed in ours and Kaster et al.’s studies. By contrast, the same predictors for symptomatic improvement for rTMS identified by Kaster et al. (use of benzodiazepines, age, depression severity) were also found in our study for tDCS.


Several limitations should be underscored. First, as this is an ancillary study, our findings are exploratory and should be interpreted as hypothesis-driven for future studies. Second, even though there were numerically more patients assigned to the rapid trajectory in tDCS vs. placebo (38.3 vs. 23.3%), pairwise comparisons were not significant. Although this finding could be interpreted as a false-negative result owing to low power, it further limits the immediate clinical applications of the present study, reinforcing the need of confirmatory trials. Third, our findings have limited external validity as patients were antidepressant-free at baseline and solely comorbid anxiety disorders were allowed. Fourth, several analyses have been performed, increasing the probability of false-positive findings. Fifth, an overfitting is likely to have occurred in bottom-up analyses. Although we were able to partly address this issue by performing internal cross-validation, no external (i.e., “out-of-sample”) validation was performed due to the lack of comparable data sets. Taken together, our findings warrant further replication in either independent datasets or prospective trials before any claims for driving clinical decision-making are made.

Final remarks

Our exploratory findings suggest that: (1) there are distinct, relevant improvement trajectories that were labeled as no/minimal, slow, and rapid improvement; (2) groups treated with tDCS, escitalopram, and placebo differed in trajectory class distributions; (3) clinical differences between trajectories could be identified in the first weeks of treatment; and (4) predictors associated with tDCS group membership included benzodiazepine use, age, and depression severity. Our results have research implications and should be used for improving the design of future studies.

Funding and disclosure

This work was primarily supported by a Stanley Medical Research Institute (12T-011) grant and was partly developed during FAPESP-BAYLAT bilateral meetings (17/50223-7). The sponsor had no role in the design and conduct of the study; collection; management; analysis; interpretation of data; preparation, review, or approval of the manuscript; and decision to submit the manuscript for publication. ARB receives productivity grants from CNPq (1B) and FMUSP (PIPA-A). The Laboratory of Neuroscience receives financial support from the Beneficent Association Alzira Denise Hertzog da Silva and the CAPES/INCT program “National Institute of Biomarkers in Psychiatry” (INBioN) (FAPESP 14/50873-3). This work was also supported by the German Center for Brain Stimulation (GCBS) research consortium (Work Package 5) [grant number 01EE1403E], funded by the Federal Ministry of Education and Research (BMBF). ARB reports grants from São Paulo Research State Foundation (2012/20911-5, 2017/50223-6, 2018/10861-7), Brazilian National Council of Scientific Development productivity support (PQ-1B), and University of São Paulo Medical School productivity support (PIPA-A), during the conduct of the study; personal fees from Neurocare GMBH outside the submitted work; and ARB is Chief Medical Advisor of Flow Neuroscience (Malmö, Sweden) and has a small equity in this company. This role started in June 2019. FP reports grants from Federal Ministry of Education and Research, Berlin, Germany, personal fees from Brainsway Inc., Jerusalem, Germany, personal fees and non-financial support from Mag&More GmbH, Munich, Germany, and non-financial support from neuroCare Group GmbH, Munich, Germany outside the submitted work. TSK is supported by the Canadian Institute for Health Research Fellowship Award and the Department of Psychiatry Clinician Scientist Program. There are no further declarations or conflicts of interest.