Skip to main content

Use of sequence analysis for classifying individual antidepressant trajectories to monitor population mental health



Over the past decade, antidepressant prescriptions have increased in European countries and the United States, partly due to an increase in the number of new cases of mental illness. This paper demonstrates an innovative approach to the classification of population level change in mental health status, using administrative data for a large sample of the Scottish population. We aimed to identify groups of individuals with similar patterns of change in pattern of prescribing, validate these groups by comparison with other indicators of mental illness, and characterise the population most at risk of increasing mental ill health.


National Health Service (NHS) prescription data were linked to the Scottish Longitudinal Study (SLS), a 5.3% sample of the Scottish population (N = 151,418). Antidepressant prescription status over the previous 6 months was recorded for every month for which data were available (January 2009–December 2014), and sequence dissimilarity was computed by optimal matching. Hierarchical clustering was used to create groups of participants who had similar patterns of change, with multi-level logistic regression used to understand group membership.


Five distinct prescription pattern groups were observed, indicating: no prescriptions (76%), occasional prescriptions (10%), continuation of prior use of prescriptions (8%), a new course of prescriptions started (4%) or ceased taking prescriptions (3%). Young, white, female participants, of low social grade, residing in socially deprived neighbourhoods, living alone, being separated/divorced or out of the labour force, were more likely to be in the group that started a new course of antidepressant prescriptions.


The use of sequence analysis for classifying individual antidepressant trajectories offers a novel approach for capturing population-level changes in mental health risk. By classifying individuals into groups based on their anti-depressant medication use we can better identify how over time, mental health is associated with individual risk factors and contextual factors at the local level and the macro political and economic scale.

Peer Review reports


In recent years there has been a global increase in mental health morbidity [1], an increase in treatment by antidepressant medicines in high income counties [2] and a growing awareness of gaps in service delivery and resources in low and middle income countries [3]. For example, between 2000 and 2015 antidepressant use more than doubled in some countries including the UK, Germany, Sweden, Australia [4]. A similar trend has been observed in the United States, where between 1999 and 2010 there was a 63% increase in reported antidepressant medication use [5]. In Scotland, over a 12 month period during 2012/2013, the number of antidepressant items recorded was 5.2 million, dispensed to 747,158 patients in Scotland, costing £29.5 million; a 52% increase from 10 years previously [6] . At this time, 9% of the Scottish population reported at least two depressive symptoms [7] and 12% took an antidepressant every day.

Population-level administrative data linked with health services information on prescriptions for mental illness offer potential to understand predictors of mental illness over time Ecological studies have captured change in mental health using fixed effects models of suicide rates, self-report and antidepressant use [8,9,10]. Repeated cross-sectional analysis of self-reported mental illness (e.g. General Health Questionnaire) are also common, although measures were analysed dichotomously [11, 12]. These methods make it difficult to distinguish trajectories of mental illness among groups in the population. Using administrative data linked with individual prescription use may be a way to address these limitations. A descriptive analysis of national changes in aggregated antidepressant use in Scotland has been conducted for 1995–2007 [10]. Studies using individual-level data on antidepressant use usually concentrate on ‘any antidepressant use’ [13] or ‘chronic’ use [14], but not on occasional, increasing or decreasing use, which are harder to define, but may be more indicative of change in population mental health.

We present a novel method for distinguishing changes in prescription use at the individual level in a very large population sample. In particular, we demonstrate the use of sequence analysis of longitudinal data to define groups of people who have shared a similar pattern of change. By analysing how antidepressant trajectories relate to other indicators of mental illness, we examine the validity of trajectories as a measure of mental illness. By modelling prescription trajectories in relation to individual and neighbourhood risk factors we also show how we can better understand the inequalities in the experiences of mental illness.


Study sample

We used data drawn from the Scottish Longitudinal Study (SLS), a population representative sample (5.3%) of individuals living in Scotland, drawn from the population census. The SLS sample are selected as having one of 20 semi-random birth dates and enter the study at one of the 1991, 2001 and 2011 censuses or through being a new birth or immigrant. To add data on NHS service use and prescriptions for mental health conditions for 2009–2014 to the SLS sample, SLS staff used the SLS/CHI (Community Health Index – population index used for healthcare purposes) number. (This is based on the Community Health Index; an administrative index used for healthcare purposes). NHS Service use data for linkage were extracted in secure conditions by staff at the electronic Data Research & Innovation Service (eDRIS), at the Information Services Division (ISD) of NHS National Services Scotland. The SLS and NHS data extracts were provided anonymized for our analyses, which were undertaken in a secure and carefully regulated setting. Results were assessed by SLS staff prior to publication to protect the anonymity of the individuals in the data set.

Antidepressant trend groups

Prescription data were originally derived from the Prescription Information System by NHS Scotland [15], which collects information on medication prescribed and dispensed at the community level. The criteria for mental illness related prescriptions was defined by the British National Formulary (BNF) numbers. This provided three classes of drugs: antidepressants (BNF: 4.3), anxiolytics (BNF: 4.1.2) and antipsychotics (BNF: 4.2), of which antidepressants were the main focus for the current study. Antidepressants have been shown to be prescribed conservatively in Scotland, when there is good reason to suggest the patient is experiencing depression [16]. Using information extracted from prior research using text-mining of dose instructions [17], we discounted Amitriptyline and Notriptyline at low doses (≤ 30 mg per day; i.e. three doses of the 10 mg tablet or one 25 mg tablet) from our antidepressant dataset, since these medicines are often used at low dose for non-mental illness related conditions (e.g. neuropathic pain) [18]. In order to measure prescription status over time, for each month, we calculated whether the participant had been prescribed antidepressants in the preceding 6 months from 2009 to 2014. Six months was chosen because it corresponds to recommended course of initial treatment to treat clinical depression under NHS guidelines [19]. Using the TraMineR package in R [20], we computed sequence dissimilarity using optimal matching (i.e. minimising insertion, deletion, substitution costs) and applied hierarchical clustering to produce five groupings of individuals by ‘antidepressant prescription trend’.

Relationship between antidepressant prescription trend group and auxiliary indicators of mental illness

In order to understand how auxiliary indicators of mental illness associated with the antidepressant trends we used measures of mental illness before and during the time prescriptions data was recorded. A further linkage was made to information drawn from NHS General Inpatient Hospital services administrative data, which indicated use of other services for mental health conditions (ICD10 classified; F10-F48) (SMR 04; Mental Health Inpatient & Day Case). Data on inpatient use of hospital services was used from 2001 to 2008, as a marker of mental illness before the start of the SLS member’s prescription record. A final indicator of participant mental illness was derived from a question SLS members were asked in the 2011 census: ‘Do you have any of the following conditions which have lasted, or are expected to last, at least 12 months?’, in which they could answer as part of a multiple choice response: ‘Mental Health condition’. This provides a self-reported mental health indicator at one time point, mid-way through the period covered by the prescription data. Data on anxiolytics and antipsychotics prescriptions were also used, with participants defined as ‘being prescribed’ if they had been prescribed anxiolytics and antipsychotics on at least one occasion from 2009 to 2014.

A series of multilevel logistic regression models were developed to determine the association between each antidepressant trajectory (i.e. dependent variables) and each of the auxiliary measures of mental illness - hospital admissions, self-reported mental illness, any anxiolytic prescriptions, and any antipsychotic prescriptions (i.e. independent variables). Additional covariates in these models included age, sex, Carstairs deprivation, employment status, ethnicity, social grade, living alone, and marital status, which are explained in full in the next section. Local authority of residence in 2011 was used as a random effect. These analyses were conducted in R version 3.4.0, using the ‘lme4’ package. We report odd ratios (OR) and 95% confidence intervals (CI).

Relationship between antidepressant prescription trend group and individual and neighbourhood risk factors

We used a number of variables describing individual attributes of sample members that were derived from the SLS census data. These included demographic characteristics such as sex, age (in 2011) and ethnicity, indicated in the literature as relevant to risks for mental illness needing prescription. Females have a 40% higher risk of antidepressant use [21]. Mental health conditions treated by antidepressants increase especially as people reach their 20’s, with people in their middle years (50–54 years old) most likely to be patients treated with antidepressants [22]. Antidepressant use tends to be lower in black and minority ethnic groups [23]. Ethnicity was classified as White/non-White/missing to reduce the risk of disclosure from low numbers in some categories (e.g. Black). We used two variables on living arrangements likely to be relevant to risk for depression: marital status in 2011 (“single”, “married”, “separated”, “divorced”, “widowed”) and whether the participant was living alone in 2011 (“Not living alone”, “Living Alone”). Antidepressant use is more likely to occur in recently divorced individuals [24] and those of working age and living alone were found to have an 81% higher risk of antidepressant use over a 7 year period [25]. Socioeconomic indicators included the employment status.. This was categorized as: “In employment”; “Unemployed”; “Retired”; “Out of labour force” (all others who were economically inactive, including those who were students, looking after home or family, long-term sick or disabled or other). We also used an approximation of an individual’s social grade was based on the socio-economic classification used by the Market Research and Marketing Industries (I-high to V-low). Local area deprivation was measured using a census-based composite indicator of various aspects of socio-economic deprivation (Carstairs decile). Carstairs Decile was measured at the level of Census Output Areas in 2011 (n = 46,351; mean population = 114), which approximate to the person’s neighbourhood of residence.. Carstairs index is comprised of the sum of four z-scored components: male unemployment rate, lack of car ownership, overcrowding and low social class (IV and V). Neighbourhood income deprivation is known to be significantly and independently associated with antidepressant use in Scotland [26].

As in the first set of models (i.e. auxiliary indicators of mental illness), membership of each antidepressant prescription trajectory group was used as the dependent variable. In these models we have omitted the auxiliary indicators of mental illness.


Antidepressant prescription trend groups

The percentage of the individuals who had been prescribed antidepressants at some point from June 2009 (i.e. 09/06) to December 2014 (i.e. 14/12) is presented in Fig. 1. This shows that antidepressant prescription use has increased in Scotland over the time period; between June 2009 and December 2014 the percentage of the population which had a prescription in the previous 6 months increased from 10.5 to 13.4%, with a trough from March–November 2011. The trough was an artefact from data loss as a consequence of medicine shortages of one of the most widely prescribed medicines (citalopram). We classified the individual sequences into five antidepressant prescription groups; these groups are visualised as the proportion of participants prescribed antidepressants for each month in the time period (Fig. 1). These groups are briefly described below.

Fig. 1
figure 1

Antidepressant prescription trend and groups

Two groups are considered as not treated for persistent depression: those who were not being prescribed any antidepressants (N = 114,491; 76%), and those with occasional low levels of prescriptions for antidepressants (with a slight increase since March 2013) (N = 15,118; 10%). A third group may comprise of individuals who were in recovery from depression, with decreasing levels of prescriptions since April 2010 (N = 3789; 3%). A fourth group could be made up of those treated for worsening levels of depression, having increasing trends in prescriptions since April 2010 (N = 5964; 4%). The fifth group are defined as probably being treated for long-term chronic depression, receiving prescribed continuously over the time studied (N = 12,056; 8%). There has been a net increase in the number of people being prescribed antidepressants (N = 2175; + 1.4%).

Relationship between antidepressant prescription trend group and auxiliary indicators of mental illness

Table 1 shows the results of the 20 multivariate models with auxiliary indicators of mental illness. We found a gradient in the strength of relationship between self-reported mental illness in 2011 and antidepressant prescription group (Table 1). The relationship was similar with past hospital admission for mental health care with an exception; previous hospital admission was not associated with increasing prescription use (OR 1.13; 95%CI 0.86–1.41). Prescription for anxiolytics was linearly associated with occasional (OR 1.91; 95%CI 1.85–1.97), decreasing (OR 2.58; 95%CI 2.48–2.67), increasingly (OR 3.28; 95%CI 3.20–3.35) and mostly on antidepressant prescriptions (OR 4.91; 95%CI 4.85–4.96). In comparison, antipsychotics were more likely for those whose antidepressant prescription pattern was defined as ‘occasional’ (OR 1.21; 95%CI 1.11–1.31), equally more likely for those with ‘increasing’ (OR 2.12; 95%CI 2.48–2.67) or ‘decreasing’ (OR 2.17; 95%CI 2.05–2.29) antidepressant use, and much more likely for those mostly on antidepressants (OR 6.16; 95%CI 6.08–6.24).

Table 1 Association between indicators of mental illness and antidepressant prescription group

Relationship between antidepressant prescription trend group and individual and neighbourhood risk factors

Table 2 shows the results of the five multivariate multi-level logistic regression models with individual and neighbourhood risk factors. Being female was associated with higher likelihood of being in the prescription groups, especially being prescribed most of the time (OR 2.19; 95% CI 2.15–2.24) (Table 2). Age in 2011 had a varied relationship with the prescription groups, generally being between 26 and 45 years old was associated with increasing prescriptions. ‘White’ ethnicity was associated with a higher likelihood of being prescribed; ‘non-white’ ethnicity was inversely associated with increasing prescriptions in particular (OR 0.47; 0.16–0.79). Being separated or divorced was associated with having been prescribed antidepressants; being separated had a stronger relationship with decreasing prescriptions (OR 1.72; 95% CI 1.58–1.87), whilst receiving occasional prescriptions was more strongly associated with being divorced (OR 1.31; 95% CI 1.24–1.37). Living alone was associated with higher likelihood of being prescribed, especially being prescribed most of the time (OR 1.28; 1.22–1.34), but not for those with occasional prescriptions (OR 0.99; 0.94–1.11). Being out of the labour force was the strongest predictor tested, with a 4-fold higher likelihood of being prescribed most of the time (OR 4.05; 4.01–4.11), being unemployed was associated with higher likelihood of decreasing prescriptions (OR 2.09; 1.93–2.24). Generally, lower social grade and higher Carstairs neighbourhood deprivation were associated with a higher likelihood of being prescribed, with the strongest relationships with being prescribed most of the time.

Table 2 Demographic, living arrangement and socioeconomic predictors of antidepressant prescription group membership


Main findings

We have demonstrated an approach to monitoring change in population mental health indicated by antidepressant prescriptions. We found the strength of the association between demographic, living arrangement, socioeconomic factors and antidepressant use varies by the pattern of prescription use over a six-year period. Compared with those receiving ‘no prescriptions’ other groups showed similar relative risks in association with variables such as sex, social grade and neighbourhood deprivation. However, the relative risk of ‘increasing’ prescription use showed more distinct associations with variables describing age, living alone, ethnicity, marital status and employment status. Young, white, female participants, of low social grade, living in deprived neighbourhoods, living alone, being separated/divorced or out of the labour force, were more likely to have started using antidepressants during the study period. This may be because of the social and economic climate at this time, which included a range of austerity-related measures that had a disproportionate impact on these women. Research has estimated that 85% of tax and benefit changes have impacted on women’s incomes – particularly on low-income women living in deprived areas [27]. Furthermore, public sector service cuts (such as to libraries, children’s centres, community centres, advice services etc.) have adversely affected women – because women are higher users of these local resources and are more likely to be employed in the public and voluntary sector than men are (ibid.). They are also more likely to be engaged in low-wage work, and have more sustained engagement with the benefit system. This has led to discussions about how women have experienced a ‘triple jeopardy’ of public sector service reductions, job losses and welfare reform [28].


The use of 6 years of monthly prescription data in a large representative sample of the Scottish population is a major strength of the study. The declining stigma surrounding treatment and increasing awareness of mental health may strengthen this indicator of mental illness in the future [29]. The auxiliary measures of mental illness history (admissions) and subjective mental illness status are also major strengths. This is one of the few large studies that has linked multiple indicators of mental illness, which is key to understanding a complete picture of population mental health [30]. Administrative data does not suffer from loss to follow up to the same extent as cohort studies that rely on non-routine methods of follow up, although there is some attrition due to death and migration. We have applied a novel technique to classify six-month prescription status. Previously this method has had limited application in health studies, with patterns of health care access a recent exception [31]. This technique has the advantage of uncovering the complexity of being prescribed medication and the pattern of relapse or remission that corresponds to disease progression, which is obscured by more commonly applied dichotomous measures.


The prescriptions data were not available before 2009, so we were unable to compare with usage during this time, which might have meant that some of the participants classified as having ‘increasing’ prescription use had been prescribed previously. Information on daily defined dose was not available. There were changes to the cost of treatment during the study period, whereby prescription charges were abolished in from the 1st of April 2011, which might have had an impact on poorer individuals seeking help. We did not have the medical diagnosis so a small number of the prescriptions may have been used to treat conditions other than depression. We did not consider co-morbidities, as this was out of the scope of the study. We also assumed that treatment dispensing was synonymous with antidepressant use, but we did not have information on actual consumption to verify this. Whilst we have named antidepressant groups based on trajectory at a population level there is likely to be significant heterogeneity in individual circumstances, whereby individuals are not experiencing the group level dynamic, e.g. co-morbidities and interactions with anxiolytic and anti-psychotic treatments might be driving antidepressant trend rather than the disease worsening. Covariate information was limited to measures collected in the census, therefore we were unable to understand effect of other lifetime factors [32] shown to be important for predicting antidepressant prescriptions (e.g. tobacco consumption). Although mental health service use stigma may be declining, it still may inhibit use of mental health care by some of those in need The current results are limited in that they underestimate certain populations at risk (e.g. young males) [33]. Therefore, some of the relationships observed between covariates and antidepressant trends may reflect differences in barriers to seeking medical help [34]. We acknowledge that low multicollinearity among our covariates will have slightly decreased precision in our estimates, but not biased our results.

Comparison with existing literature

Similar methods have been used in previous studies to classify trajectories of annual antidepressant dose over time [35]. The authors of that study use latent class model, which is shown provide similar groupings to the sequence analysis used in the current study [36]. The sample used in their study was very specific – patients before and after being granted disability pension due to common mental disorders [35]. These individuals would have formed part of our ‘out of labour force’ group, which had the strongest relationship (OR 4.06; 95% CI 4.01 to 4.11) with having been prescribed most of the time and might explain why they found homogeneity in the pattern of the Daily Defined Dose (DDD) (i.e. 89% of the sample varied very little). We have shown how the current method could provide a scalable international comparable way to monitor medication use in the general population.

The relationship between socioeconomic variables and antidepressant pattern indicates that the greatest nequality exists for long-term prescription use. Previously it was found that there was little socioeconomic patterning in antidepressant review consultations in Scotland [37], which suggests that rather than differences in healthcare provision, the difference is due to disease severity. We found that unemployment was associated with decreasing use of antidepressants similar to other studies, which have found that unemployment status correlates with decreasing antidepressant use [38]. This effect is thought to be driven by health selection, whereby mental health status deteriorates before unemployment, and then improves during unemployment [39, 40], perhaps due to relief of work related stressors. Living alone had stronger associations with antidepressants in another study (OR 1.81; 95%CI 1.46–2.23) [25] than in the current study (OR ranged from 1.10 to 1.28 for ‘decreasing’, ‘increasing’ and ‘most of the time’ groups), which may be explained by the differences in sample. The association between living alone and common mental illness is found in other research to be mostly (84%) due to a great sense of loneliness [41]. Previous work estimated that psychotropic medication peaks 6–9 months before divorce and declined for 18 months thereafter [42], however we found that separation (which often precedes divorce) had a stronger relationship with a reduction in antidepressants, indicating that separation may provide a buffer to mental health distress between marriage and divorce.

The pattern of antidepressant prescriptions gives a good indication of mental illness; being on prescriptions most of the time is strongly and positively associated with self-reported mental illness and previous hospital admissions; the inverse is true for ‘no prescriptions’ or ‘occasional’ prescriptions. ‘Increasing’ prescriptions had a weaker relationship with self-reported mental illness than decreasing prescriptions, which shows that there might be a lag between starting medication and identifying oneself as having a mental illness. No association exists between previous psychiatric hospital admissions and the ‘increasing’ prescriptions group, which may indicate that these patients have had a new episode of depression following the Recession. The negative relationship between self-reporting mental illness and previous hospital admissions, and the ‘occasional’ prescription group confirmed that this group is unlikely to be suffering from persistent depression. Significant polypharmacy existed with antidepressant, anxiolytics and antipsychotics prescription; a possible sign of comorbid mental disorders. Antidepressants combined with anxiolytics were prescribed together particularly for those who had increased their antidepressant prescriptions. Antidepressants combined with antipsychotics were prescribed especially for those that have been prescribed antidepressants continuously over the study period. Polypharmacy has been advocated as a way to treat severe and treatment-resistant depression [43], however concerns have been raised especially for antidepressant-antipsychotic combinations with benefits outweighed by the increased risk of adverse effects (e.g. suicide) [44].

Implications for public health and research

Public health organisations could utilise the methods outlined in this paper to continuously monitor population mental health. The current application has shown the national trends and groupings for 2009–2014, but it could also be useful for a number of spatiotemporal configurations. Further drilling down to refine groupings may also be useful. Future research could usefully develop this approach to examine measures of mental illness across the life course to understand continuation, relapse and remission, in combination with personal experiences by patients [45]. In particular, a high-risk change in living arrangements - going from marriage to separation and divorce and how that can lead to loneliness associated with living alone, warrants further investigation.


This study provides a novel approach to understanding population-level risk group changes in mental health, using health service (prescription) data. These methods provide new opportunities for policymakers to monitor population mental health inequalities. Combining the at-risk prescription group from the current study (i.e. white, female participants, of low social grade, living in deprived neighbourhoods, living alone, being separated/divorced or out of the labour force), with the at-risk profiles of other indicators of mental illness would improve the approach to delivering policies to help those most in need.

Availability of data and materials

Data sharing is not applicable to this article. The SLS data can be accessed by following the steps outlined here:



National Health Service


Scottish Longitudinal Study


Electronic Data Research & Innovation Service


Information Services Division


British National Formulary


International Classification of Diseases


Scottish Morbidity Record


Odds Ratio

95% CI:

95% Confidence Intervals


  1. Richter D, Wall A, Bruen A, Whittington R. Is the global prevalence rate of adult mental illness increasing? Systematic review and meta-analysis. Acta Psychiatr Scand. 2019;140(5):393–407.

    Article  CAS  PubMed  Google Scholar 

  2. Gusmao R, Quintao S, McDaid D, Arensman E, Van Audenhove C, Coffey C, Varnik A, Varnik P, Coyne J, Hegerl U. Antidepressant utilization and suicide in Europe: an ecological multi-National Study. PLoS One. 2013;8(6):e66455.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  3. Baingana F, al’Absi M, Becker AE, Pringle B. Global research challenges and opportunities for mental health and substance-use disorders. Nature. 2015;527(7578):S172–7.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  4. OECD. Antidepressant drugs consumption, 2000 and 2015 (or nearest year), in pharmaceutical sector. Paris: OECD Publishing; 2017.

    Google Scholar 

  5. Mojtabai R, Olfson M. National trends in long-term use of antidepressant medications: results from the U.S. National Health and nutrition examination survey. J Clin Psychiatry. 2014;75(2):169–77.

    Article  CAS  PubMed  Google Scholar 

  6. Scottish Parliament Information Centre (SPICe). SPICe Breifing: Mental Health in Scotland; 2014. p. 1–49.

    Google Scholar 

  7. Scottish Government: Scottish health survey 2017: volume one - main report. In. Edited by Population Health Directorate; 2018.

    Google Scholar 

  8. Barr B, Taylor-Robinson D, Stuckler D, Loopstra R, Reeves A, Whitehead M. ‘First, do no harm’: are disability assessments associated with adverse trends in mental health? A longitudinal ecological study. J Epidemiol Community Health. 2016;70(4):339–45.

    Article  CAS  PubMed  Google Scholar 

  9. Norstrom T, Gronqvist H. The great recession, unemployment and suicide. J Epidemiol Community Health. 2015;69(2):110–6.

    Article  PubMed  Google Scholar 

  10. Lockhart P, Guthrie B. Trends in primary care antidepressant prescribing 1995-2007: a longitudinal population database analysis. Br J Gen Pract. 2011;61(590):e565–72.

    Article  PubMed  PubMed Central  Google Scholar 

  11. Katikireddi SV, Niedzwiedz CL, Popham F. Trends in population mental health before and after the 2008 recession: a repeat cross-sectional analysis of the 1991–2010 health surveys of England. BMJ Open. 2012;2(5):e001790.

    Article  PubMed  PubMed Central  Google Scholar 

  12. Moncho J, Pereyra-Zamora P, Tamayo-Fonseca N, Giron M, Gómez-Beneyto M, Nolasco A. Is recession bad for your mental health? The answer could be complex: evidence from the 2008 crisis in Spain. BMC Med Res Methodol. 2018;18(1):78.

    Article  PubMed  PubMed Central  Google Scholar 

  13. Kantor ED, Rehm CD, Haas JS, Chan AT, Giovannucci EL. Trends in prescription drug use among adults in the United States from 1999-2012. JAMA. 2015;314(17):1818–31.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  14. Verhaak PFM, de Beurs D, Spreeuwenberg P. What proportion of initially prescribed antidepressants is still being prescribed chronically after 5 years in general practice? A longitudinal cohort analysis. BMJ Open. 2019;9(2):e024051.

    Article  PubMed  PubMed Central  Google Scholar 

  15. Alvarez-Madrazo S, McTaggart S, Nangle C, Nicholson E, Bennie M. Data Resource Profile: The Scottish National Prescribing Information System (PIS). Int J Epidemiol. 2016;45(3):714–715f.

    Article  PubMed  PubMed Central  Google Scholar 

  16. Cameron IM, Lawton K, Reid IC. Appropriateness of antidepressant prescribing: an observational study in a Scottish primary-care setting. Br J Gen Pract. 2009;59(566):644–9.

    Article  PubMed  PubMed Central  Google Scholar 

  17. McTaggart S, Nangle C, Caldwell J, Alvarez-Madrazo S, Colhoun H, Bennie M. Use of text-mining methods to improve efficiency in the calculation of drug exposure to support pharmacoepidemiology studies. Int J Epidemiol. 2018;47(2):617–24.

    Article  PubMed  PubMed Central  Google Scholar 

  18. Moore RA, Derry S, Aldington D, Cole P, Wiffen PJ. Amitriptyline for neuropathic pain in adults. Cochrane Database Syst Rev. 2015;7:CD008242.

    Google Scholar 

  19. NHS (2020). “Antidepressants: An Overview.” Retrieved 01/01/20, from

    Google Scholar 

  20. Gabadinho A, Ritschard G, Muller NS, Studer M. Analyzing and visualizing state sequences in R with TraMineR. J Stat Softw. 2011;40(4):1–37.

    Article  Google Scholar 

  21. Lewer D, O'Reilly C, Mojtabai R, Evans-Lacko S. Antidepressant use in 27 European countries: associations with sociodemographic, cultural and economic factors. Brit J Psychiat. 2015;207(3):221–6.

    Article  PubMed  Google Scholar 

  22. Division IS. Medicines used in mental health: years 2007/08–2017/18. In. Edited by Statistics N; 2018.

    Google Scholar 

  23. Schofield P, Das-Munshi J, Mathur R, Congdon P, Hull S. Does depression diagnosis and antidepressant prescribing vary by location? Analysis of ethnic density associations using a large primary-care dataset. Psychol Med. 2016;46(6):1321–9.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  24. Monden CWS, Metsa-Simola N, Saarioja S, Martikainen P. Divorce and subsequent increase in uptake of antidepressant medication: a Finnish registry-based study on couple versus individual effects. BMC Public Health. 2015;15:158.

    Article  PubMed  PubMed Central  Google Scholar 

  25. Pulkki-Raback L, Kivimaki M, Ahola K, Joutsenniemi K, Elovainio M, Rossi H, Puttonen S, Koskinen S, Isometsa E, Lonnqvist J, et al. Living alone and antidepressant medication use: a prospective study in a working-age population. BMC Public Health. 2012;12:236.

    Article  PubMed  PubMed Central  Google Scholar 

  26. Morrison J, Anderson MJ, Sutton M, Munoz-Arroyo R, McDonald S, Maxwell M, Power A, Smith M, Wilson P. Factors influencing variation in prescribing of antidepressants by general practices in Scotland. Brit J Gen Pract. 2009;59(559):88–93.

    Article  Google Scholar 

  27. Greer Murphy A. Mothers in austerity. In: Health in Hard Times: Austerity and Health Inequalities. Edn. Bristol: Policy Press; 2019.

    Google Scholar 

  28. Craddock E. Caring about and for the cuts: a case study of the gendered dimension of austerity and anti-austerity activism. Gender Work Organ. 2017;24(1):69–82.

    Article  Google Scholar 

  29. Saporito JM, Ryan C, Teachman BA. Reducing stigma toward seeking mental health treatment among adolescents. Stigma Res Action. 2011;1(2):9–21.

    CAS  PubMed  PubMed Central  Google Scholar 

  30. Tannenbaum C, Lexchin J, Tamblyn R, Romans S. Indicators for measuring mental health: towards better surveillance. Healthc Policy. 2009;5(2):e177–86.

    PubMed  PubMed Central  Google Scholar 

  31. Haenssgen MJ, Ariana P. Healthcare access: a sequence-sensitive approach. SSM Popul Health. 2017;3:37–47.

    Article  PubMed  Google Scholar 

  32. Boyle S, Murphy J, Rosato M, Boduszek D, Shevlin M. Predictors of antidepressant use in the English population: analysis of the adult psychiatric morbidity survey. Ir J Psychol Med. 2018;37(1):15–23.

  33. Han KM, Won E, Paik JW, Lee MS, Lee HW, Ham BJ. Mental health service use in adults with suicidal ideation within a nationally representative sample of the Korean population. J Affect Disord. 2016;193:339–47.

    Article  PubMed  Google Scholar 

  34. Oliver MI, Pearson N, Coe N, Gunnell D. Help-seeking behaviour in men and women with common mental health problems: cross-sectional study. Br J Psychiatry. 2005;186:297–301.

    Article  PubMed  Google Scholar 

  35. Rahman S, Wiberg M, Alexanderson K, Jokinen J, Tanskanen A, Mittendorfer-Rutz E. Trajectories of antidepressant medication use in individuals before and after being granted disability pension due to common mental disorders- a nationwide register-based study. Bmc Psychiatry. 2018;18:47.

    Article  PubMed  PubMed Central  Google Scholar 

  36. Barban N, Billari FC. Classifying life course trajectories: a comparison of latent class and sequence analysis. J R Stat Soc C-Appl. 2012;61:765–84.

    Article  Google Scholar 

  37. Sinclair JE, Aucott LS, Lawton K, Reid IC, Cameron IM. The monitoring of longer term prescriptions of antidepressants: observational study in a primary care setting. Fam Pract. 2014;31(4):419–26.

    Article  PubMed  Google Scholar 

  38. Kaspersen SL, Pape K, Ose SO, Gunnell D, Bjorngaard JH. Unemployment and initiation of psychotropic medication: a case-crossover study of 2 348 552 Norwegian employees. Occup Environ Med. 2016;73(11):719–26.

    PubMed  Google Scholar 

  39. Leinonen T, Maki N, Martikainen P. Trajectories of Antidepressant Medication before and after the Onset of Unemployment by Subsequent Employment Experience. PLoS One. 2017;12(1):e0169652.

    Article  PubMed  PubMed Central  CAS  Google Scholar 

  40. Bijlsma MJ, Wilson B, Tarkiainen L, Myrskyla M, Martikainen P. The impact of unemployment on antidepressant purchasing: adjusting for unobserved time-constant confounding in the g-formula. Epidemiology. 2019;30(3):388–95.

    Article  PubMed  PubMed Central  Google Scholar 

  41. Jacob L, Haro JM, Koyanagi A. Relationship between living alone and common mental disorders in the 1993, 2000 and 2007 National Psychiatric Morbidity Surveys. PLoS One. 2019;14(5):e0215182.

    Article  PubMed  PubMed Central  Google Scholar 

  42. Metsa-Simola N, Martikainen P. Divorce and changes in the prevalence of psychotropic medication use: a register-based longitudinal study among middle-aged Finns. Soc Sci Med. 2013;94:71–80.

    Article  PubMed  Google Scholar 

  43. Dold M, Bartova L, Mendlewicz J, Souery D, Serretti A, Porcelli S, Zohar J, Montgomery S, Kasper S. Clinical correlates of augmentation/combination treatment strategies in major depressive disorder. Acta Psychiatr Scand. 2018;137(5):401–12.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  44. Verdoux H, Pambrun E, Tournier M, Cortaredona S, Verger P. Multi-trajectories of antidepressant and antipsychotic use: a 11-year naturalistic study in a community-based sample. Acta Psychiatr Scand. 2019;139(6):536–47.

    Article  CAS  PubMed  Google Scholar 

  45. Gibson K, Cartwright C, Read J. ‘In my life antidepressants have been…’: a qualitative analysis of users’ diverse experiences with antidepressants. BMC Psychiatry. 2016;16(1):135.

    Article  PubMed  PubMed Central  CAS  Google Scholar 

Download references


The help provided by staff of the Longitudinal Studies Centre Scotland is acknowledged. The LSCS is supported by the ESRC /JISC, the Scottish Funding Council, the Scientists Office and the Scottish Government. The authors alone are responsible for the interpretation of the data. Census output is Crown copyright and is reproduced with the permission of the Controller of HMSO and the Queen’s Printer for Scotland. We also acknowledge help and advice from colleagues at: The Centre for Research on Environment, Society and Health (University of Edinburgh), The Administrative Data Research Centre (University of Edinburgh) and NHS Scotland.


This research is supported by the Economic and Social Research Council, UK, project reference: ES/P008585/1. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. This work was supported by the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement (grant number 676060 [LONGPOP – Methodologies and Data Mining Techniques for the Analysis of Big Data Based on Longitudinal Population and Epidemiologic Registers]) to GB. Disclaimer: This publication reflects only the author’s view and that the Research Executive Agency is not responsible for any use that may be made of the information it contains.

Author information

Authors and Affiliations



SC, CD, NC, CB, MC and JP conceived and designed the analysis. SC, GB and MC collected the data. MC, GB, SM and KL contributed to the analysis tools (sequence analysis). MC performed the analysis. MC drafted the manuscript. All authors made substantial contributions to the final text in the manuscript. The author(s) read and approved the final manuscript.

Corresponding author

Correspondence to Mark Cherrie.

Ethics declarations

Ethics approval and consent to participate

Permission to use the SLS and other data sources has been approved by the data controllers of the SLS and by the Public Benefit and Privacy Panel, responsible for governance of use of NHS eDRIS statistics, held securely in the ESRC Administrative Data Research Centre in Edinburgh. The analysis was undertaken in the secure data centre where the SLS data are held. Ethical approval was issued by the University of Durham.

Consent for publication

Not Applicable.

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit The Creative Commons Public Domain Dedication waiver ( applies to the data made available in this article, unless otherwise stated in a credit line to the data.

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Cherrie, M., Curtis, S., Baranyi, G. et al. Use of sequence analysis for classifying individual antidepressant trajectories to monitor population mental health. BMC Psychiatry 20, 551 (2020).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI:


  • Public health monitoring
  • Health service use
  • Administrative data
  • Prescriptions
  • Antidepressants
  • Mental health
  • Sequence analysis