Article Text

Download PDFPDF

Comparative risk of new-onset diabetes following commencement of antipsychotics in New Zealand: a population-based clustered multiple baseline time series design
  1. Olivia Currie1,
  2. Jonathan Williman2,
  3. Dee Mangin1,3,
  4. Bianca McKinnon-Gee4,
  5. Paul Bridgford4
  1. 1 Department of General Practice, Christchurch School of Medicine, University of Otago, Christchurch, New Zealand
  2. 2 Department of Public Health, Christchurch School of Medicine, University of Otago, Christchurch, New Zealand
  3. 3 Department of Family Medicine, McMaster University, Hamilton, Ontario, Canada
  4. 4 Pegasus Health (Charitable), Christchurch, New Zealand
  1. Correspondence to Dr Olivia Currie; olivia.currie{at}


Objective Newer antipsychotics are increasingly prescribed off-label for non-psychotic ailments both in primary and secondary care settings, despite the purported risk of weight gain and development of type 2 diabetes mellitus. This study aims to determine any relationship between the development of clinically significant new-onset type 2 diabetes mellitus and novel antipsychotic use in New Zealand using hypnotic drugs as control.

Design A population-based clustered multiple baseline time series design.

Setting Routinely collected data from a complete national pharmaceutical database in New Zealand between 2005 and 2011.

Participants Patients aged 40–60 years in the year 2006 who were ever dispensed antipsychotics (exposure groups—first-generation antipsychotics, second-generation antipsychotics and antipsychotics with low, medium and high risk for weight gain) or hypnotics (control group) between 2006 and 2011.

Main outcome measure First ever metformin dispensed to patients in each study group between 2006 and 2011 as proxy for development of clinically significant type 2 diabetes mellitus, no longer amendable by lifestyle modifications.

Results Patients dispensed a second-generation antipsychotic had 1.49 times increased risk (95% CI 1.10 to 2.03, p=0.011) of subsequently commencing metformin. Patients dispensed an antipsychotic with high risk of weight gain also had a 2.41 times increased risk of commencing on metformin (95% CI 1.42 to 4.09, p=0.001).

Conclusions Patients dispensed a second-generation antipsychotic and antipsychotics with high risk of weight gain appear to be at increased risk of being secondarily dispensed metformin. Caution should be taken with novel antipsychotic use for patients with increased baseline risk of type 2 diabetes mellitus.

  • antipsychotics
  • hypnotics
  • diabetes
  • metformin
  • primary care
  • electronic prescription

This is an open access article distributed in accordance with the Creative Commons Attribution Non Commercial (CC BY-NC 4.0) license, which permits others to distribute, remix, adapt, build upon this work non-commercially, and license their derivative works on different terms, provided the original work is properly cited, appropriate credit is given, any changes made indicated, and the use is non-commercial. See:

Statistics from

Strengths and limitations of this study

  • A population-based cohort study using a national electronic pharmaceutical database, representing complete population-level data for prescribing in New Zealand.

  • Using the marker of first metformin dispensed as indication of development of clinically significant type 2 diabetes mellitus among patients prescribed antipsychotics.

  • This is the first pharmacoepidemiological study to apply robust quasi-experimental study design to control for time-invariant confounding.

  • Risk of misclassification of exposure as medications dispensed are not always taken as directed as participant’s level of drug adherence was not accounted for.

  • Risk of misclassification of outcome as metformin is also dispensed for management of other medical conditions such as polycystic ovary syndrome and extreme insulin resistance with acanthosis nigricans.


Higher doses of some antipsychotics (APs) increase the risk for weight gain and development of type 2 diabetes mellitus (T2DM).1–6 This risk is widely accepted in the psychiatric community and patients on higher doses of AP are well monitored during the course of their treatment as a result.4 7 8

However, there is an increasing trend to prescribe AP off-label for ailments such as anxiety, insomnia, personality disorders and post-traumatic stress in primary and secondary care.9–11 It may be perceived as less harmful, however, even low doses of some APs are known to increase the risk of weight gain,1 12 13 which consequently may increase the risk of T2DM.14 The comparative risks of different subgroups of APs are not yet known. As obesity is now of global concern,15 16 it is important to ascertain such risk to minimise avoidable harm from prescription medications.

Cohort studies using population-based electronic datasets are useful tools in analysing prescription medicine effects in the community.17–20 This population-based cohort study investigates any associations between clinically significant new-onset T2DM with AP use via analyses of the national pharmaceutical dataset in New Zealand (NZ). The risk of T2DM will be measured by proxy of first dispensed metformin, indicating that clinical diagnosis is no longer amendable by lifestyle modification. The change in incidence of first dispensed metformin for patients before versus after receiving first dispensed AP (exposure group) and is calculated and compared with future cases who have not yet been dispensed AP. Independent analysis is repeated with hypnotics as control group, as they are also commonly prescribed for off-label use.


This study used the national administrative electronic pharmaceutical database to evaluate the incidence of T2DM by proxy of first metformin dispensed for patients before and after they commenced on an AP. As a further control, the analysis was replicated in patients dispensed hypnotics, with similar exclusion criteria applied (online supplementary appendix 1). The study used a multiple baseline time series design21 comprising interrupted time series (ITS), a pre and post quasi-experimental approach where subjects are observed multiple times before and after the introduction of exposure drugs. Similar to other within-subject or self-controlled designs ITS helps control for time-invariant confounders,22 allow for estimation of pre-exposure trends, and immediate (level change) and delayed (slope change) effects following commencement of exposure drugs.23 The multiple baseline time series provides additional control for population-level time-variant effects by staggering the timing of the study cohort across subjects or clusters of subjects.24 Where the ordering of the exposure is randomised, the design is also known as a cohort stepped-wedge cluster randomised trial and may include a transition period immediately after the introduction of the exposure drug (figure 1).25 For the current study, patients were non-randomly allocated into clusters according to the year they were first dispensed the exposure drug (AP or hypnotics). Outcome assessment and time between steps occurred at yearly intervals, allowing for both within-subject and between-subject comparisons.

Supplemental material

Figure 1

Study design. Subjects were grouped into clusters according to the year they were first dispensed the exposure drug. In 2005 (orange), no patients were dispensed any of the outcome, exposure or exclusion drugs. Patients were then observed from 2006 to 2011, where they moved from being unexposed (green), to exposed (blue). The year of first exposure (light blue) indicates the transition year. By 2011, all patients had been dispensed the exposure medication. The proportion of patients commencing on metformin was observed each year.

Patient and public involvement

No identifiable patients nor public are involved.

Data source

The NZ government subsidises medications for all residents based on a national drug formulary. All subsidised dispensing from pharmacies in NZ are submitted to the New Zealand Pharmaceutical Collection (NZPC) via the State Service’s General Transaction Processing System. These data are made accessible to researchers via the New Zealand Health Information Service.26 Our data were extracted via this service by Pegasus Health (Charitable), a primary healthcare organisation in Christchurch, NZ. Identification and anonymity of individual patients is maintained by the encryption of their National Health Index (NHI) (a number unique healthcare user identifier) on data extraction and was the primary linkage key on all data extraction and analysis.

Study population and cohort construction

Dispensing data for the years 2005–2011 inclusive were obtained from the NZPC for individuals aged between 40 and 60 years in 2006 for the following drug classes—AP (exposure), hypnotics (exposure), metformin (outcome) and exclusion criteria drugs (patients were excluded from cohorts if they were ever dispensed drugs used to treat diabetes or drugs known to increase risk of weight gain and diabetes) (online supplementary appendix 1). The age range of patients (40–60 years) was selected to include individuals more commonly screened for diabetes risk in the community in NZ.

The four extracted datasets each contained the patients’ encrypted NHI and demographics (gender and ethnicity), and dispensed medication details (name and formulation of drug, and year dispensed). Data extracts were summarised and merged by encrypted NHI and year. Individual drugs were then combined into drug classes to achieve sufficient power in the analysis. APs were grouped two ways for analysis. First, as first-generation antipsychotics or second-generation antipsychotics (FGAs or SGAs, respectively). Second, by published risk of weight gain—low, medium and high-risk AP (online supplementary appendix 1). Clozapine and olanzapine were categorised high risk. Chlorpromazine, quetiapine and risperidone were categorised medium risk. Amisulpride, aripiprazole, haloperidol, ziprasidone, pericyazine, trifluoperazine and zuclopenthixol were categorised low risk.6 27

Binary variables were created to indicate whether an individual in a given year was ever dispensed each of the study drug classes, metformin and/or exclusion drugs. For the purposes of the analysis, AP groups were considered the exposures of interest, hypnotics as the negative control exposure and metformin as the outcome.

Participant selection

A subdataset of new patients was then prepared for constructing each of the study cohorts by selecting patients who were dispensed the exposure drug at any time between 2006 and 2011 (open cohorts). To create a cohort of ‘non-diabetic new users’, patients were excluded if they were dispensed the exposure drug or any treatment for diabetes in 2005. Patients dispensed an oral or injectable hypoglycaemic agent in any calendar year before being dispensed metformin were also excluded as they were assumed to have pre-existing diabetes.

Patients in these open cohorts were followed from 2006 to 2011, or until one of the three following events occurred—the patient was dispensed metformin, the patient ceased using the exposure drug after having started it (intermittent users), or the patient started an exclusion drug or an APs with higher risk of weight gain.

For sensitivity analysis, closed cohorts were created by completely excluding all patients who ceased using the exposure drug after having started it, or who were recorded as having been dispensed a known diabetogenic drug between 2005 and 2011 inclusive.

Death or emigration of participants was not recorded in the dataset and was estimated to be less than 2%, assuming death and emigration rates were similar to the overall NZ population within similar age groups during the study period.18

Statistical methods and analysis

Patient and cluster characteristics were summarised using simple descriptive statistics. Crude incidence rates were initially calculated by grouping the data by exposure cohort and by year of observation, followed by counting the number of patients first dispensed metformin (numerator) and then dividing this by the total number of patients under observation (denominator). Annual incidence rates were plotted by time before and after initiating the exposure drug.

The effect of each exposure drug on incidence of metformin initiation was modelled using independently using a generalised linear model, with a log link and robust ‘sandwich’ SEs. Clustering of observations within an individual was accounted for using generalised estimating equations with an ‘ar1’ correlation structure. Two time-dependent binary variables were used to indicate when subjects were exposed versus non-exposed, and the year that an individual was first dispensed the exposure medicine (labelled as ‘exposed and ‘transition year’, respectively). In addition, ‘time exposed’ was included to investigate cumulative effects of exposure. Year of observation was included as a time-dependent confounder in the model, and gender and ethnicity as time-independent confounders. Analysis was performed using the package ‘geepack’ available on R.28


Cohort characteristics

A total of 262 982 unique patients were dispensed one of the exposure drugs during the study period. After exclusion of individuals who did not meet eligibility criteria, 181 768 patients were eligible in the open cohorts—157 275, 5551 and 18 942 in the groups who had prescription initiated for hypnotic, FGA, SGA, respectively (table 1). Eight hundred and sixty-one participants (15.5% of those on FGA and 4.5% of those on SGA) were recorded as having been dispensed a both FGA and an SGA in the same year and were excluded for analysis. For patients on APs, 4977, 18 288 and 3996 met the drug inclusion criteria and were analysed in the low, medium and high-risk AP groups (for weight gain) separately from the initial analysis but were excluded if patients transitioned from a low to high-risk AP group during the study period.

Table 1

Number of participants included in analysis and reasons for exclusion

For sensitivity analysis, a total of 39 923 patients were analysed—32 452, 454 and 7017 in the groups who had ever been dispensed a hypnotic, FGA, SGA, respectively (table 1).

Participant characteristics

The baseline participant characteristics of the cohorts are summarised in table 2. There were more females dispensed a hypnotic (61.8%) than males, but sex of patients were relatively equally balanced for those dispensed all AP (regardless of type). Over three-quarters of all participants were of NZ European ethnicity (79.9%) were dispensed a hypnotic and a higher proportion of those dispensed an AP were of Māori ethnicity (12.4%) compared with other ethnicities.

Table 2

Participant characteristics

Primary analysis

After being dispensed an SGA, participants have an overall 1.49 times (95% CI 1.10 to 2.03) increased risk of starting on metformin and there was weak evidence that this risk increased the longer they remained on SGA. Similarly, those on AP with medium or high risk of weight gain showed increased risks of commencing metformin by 1.37 times (95% CI 0.96 to 1.95) and 2.41 times (95% CI 1.42 to 4.09), respectively. Conversely, there was little evidence of a sustained elevated risk of being dispensed metformin among subjects who were dispensed hypnotics, FGAs or low-risk APs. All groups, except FGA and low-risk AP, showed an elevated risk of commencing on metformin in the same year they commenced the exposure drugs (year 1 or the ‘transition year’). Our data also suggested that those who were dispensed a high-risk AP had a lower pre-exposure risk of commencing metformin compared with those dispensed other AP.

Those who initiated hypnotics during the study period had a lower pre-exposure risk of commencing metformin than those who were dispensed an AP.

The observed incidences of being dispensed metformin before and after exposure drugs are shown in figure 2, and effect estimates from regression models are presented in table 3.

Table 3

Risk of commencing on metformin according to exposure to hypnotics or APs (open cohorts)

Figure 2

Incidence of first metformin dispensed by exposure drug (cohort) and year of first exposure (cluster). Points (error bars) represent observed incidence rates (95%  ‘Wilson’ binomial CI). Dotted vertical lines represent year of first exposure (transition year), points to the left of the line represent unexposed subjects, points to the right of the line represent exposed subjects. Lines (shading) represent incidence rates predicted by generalised linear regression models. AP, antipsychotic. 

Sensitivity analysis

Repeating the analysis on closed cohorts resulted in broadly similar results, although with wider CIs due to the reduced sample sizes (table 4).

Table 4

Risk of commencing on metformin according to exposure to hypnotics or APs (closed cohort)


These data showed patients have an increased risk of developing clinically significant T2DM, by proxy of a patient being dispensed metformin, after having been dispensed either an SGA or a high-risk AP. This is the first study to use a general population representative dataset to estimate the change in incidence of clinically significant T2DM in patients aged 40–60 years who were prescribed APs. These results represent important safety data from a real-world population where most prescribing occurs without the tightly constrained entry criteria and short study period of a clinical trial population, or limitation to the psychiatric population.

To our knowledge, this is also the first study to apply multiple baseline time series design to analyse national pharmaceutical data. This design has been considered by some to be a ‘viable alternative to the randomised controlled trial’ and the case for causation can be compelling if the following criteria are meet: (1) baseline pre-exposure rates are stable within and across subjects/clusters, (2) the introduction of the exposure of interest results in a detectable and meaningful change that is consistently replicated across each of the subjects/clusters and (3) the direction and magnitude of the change is exposure specific and is consistent with prior theory and research.21 24 Further, unlike many other case-only used in pharmacoepidemiology, the multiple baseline design can be used to detect associations between long-lived exposures and chronic outcomes.22

Using this design, our study found that patients in the general population dispensed SGA and high-risk APs have a sustained elevated risk of developing clinically significant T2DM at a population level, by proxy of being dispensed metformin following initiation of study medications.3 17 29 Although we have not looked in detail at dosages, this effect was previously observed in patients dispensed relatively low doses of these drugs.17 This is important information for prescribers especially in prescribing SGA and high-risk APs for non-serious psychiatric conditions.

It is interesting to see a strong effect in the first year of use for both AP and hypnotics given the initial spike of first metformin dispensed compared with subsequent years. This coprescribing bias could indicate good medical practice whereby a patient is clinically examined and investigated appropriately for T2DM prior to prescribing an AP in this case (although the study age group are also commonly screened for cardiovascular risks).

The pattern of T2DM incidence following the first year of exposure may be influenced by several factors other than direct effects of the exposure drugs. First, coprescribing bias is likely to only last 1 year, with rates returning to pre-exposure levels or lower as untreated cases of T2DM are mopped up or that borderline cases are deleted early. It could also indicate vigilance in screening as this spike only lasted 1 year with incidence rates remained slightly elevated above baseline thereafter.

The utility of a national electronic pharmaceutical dataset has previously been validated by others and ourselves for assessing the association between medication use and development of clinically significant diabetes.18 19 30 We were also able to assess effects in this cohort longitudinally over 5 years using this approach, and as a result successfully demonstrated the utility of a proxy measure for development of clinically significant T2DM by first ever metformin dispensed.


Our study has several limitations. The limited number of variables in the available dataset meant it was not possible to obtain information on time-dependent confounding factors linked to increased diabetes risks (eg, changes in body mass index, initiation of other medications and family history). Hence, such potential effect modifiers are unaccounted for in this study.

Since only the dispensing dataset is available from the NZPC for analysis and not the prescribing dataset, there is an increased risk of misclassification of outcome as medications prescribed were not always dispensed nor were they always taken as directed. Gardner et al investigated the non-dispensing rate in 1992 for NZ. They concluded a high non-dispensing rate of medications prescribed (between 9.8% and 17.6%) and this appears to be strongly associated with a patient’s eligibility for higher government funding for medications.31 Such misclassification would reduce the effect size but not the validity of the association seen.

There is a very small risk of misclassification of outcome as metformin is also dispensed for management of other medical conditions such as polycystic ovary syndrome and extreme insulin resistance with acanthosis nigricans. For AP users, it may have also been prescribed off-label for prevention of weight gain or weight reduction. However, this is likely to account for only a small proportion of our study population, and there is no reason to think there is an association with the exposure of interest.

This study was unable to observe the frequency of T2DM screening in the primary care setting as the NZPC is not currently linked to the laboratory dataset on a national level. Hence, we were unable to assess the duration of mild hyperglycaemia prior to commencement of metformin or diabetes testing rates.


This population-based study provides important information on the safety of AP prescribing at a population level. We observed patients receiving their first prescription of SGA and high-risk APs are at increased risk subsequently being dispensed metformin. The effect may carry an exposure-duration response in the groups studied, and this is important information for prescribers and patients especially with novel AP use. These data support caution in prescription of these agents, especially when prescribed off-label, careful thought about the choice of agents and a reminder to limit prescription duration whenever possible. This is essential information for prescribers and patients when considering the balance of harms against the potential benefit in different clinical circumstances.

The study demonstrated that medications make an important contribution to this disease burden, potentially contributing to substantial long-term morbidity and health services costs. As a result, these findings contribute to the importance of weighing the risk benefits of prescribing these agents, and if the prescribing decisions have been made, in the choice of agents. It is important to explore the potential contribution of different combination of medications to this disease burden in studies such as this.

Further research

This study outlined an alternative method for assessing adverse effects after initiation of chronic medications and it will be useful to test the utility of this method with other drug combination and settings.

It would also be of interest to analyse any drug-dose response to AP use, and any cumulative effect on diabetes control following the first metformin dispensed.

Other drug classes have also been found to increase diabetes risk, including drugs used commonly to modify cardiovascular risk. Whether there is an additive risk of inducing diabetes with combinations these drugs and AP is currently unknown. This is an important area for research given the prevalence of multimorbidity and polypharmacy.

Development of clinically significant T2DM is still an intermediate outcome indicator. T2DM is itself a source of morbidity and mortality largely as a risk factor for other diseases, predominantly cardiovascular disease. It is unclear what other relevant morbidity and mortality outcomes these patients will subsequently have.

Our research found a general increased risk of all patients developing T2DM over the study period, as indication by cumulative proportion of participants being dispensed metformin over the study period. This mirrors with both national and global concern about increasing development of T2DM, possibility in relation to increasing obesity rate.15 16


We thank the Canterbury Chair of General Practice Trust for sponsoring the role of General Practice Research Registrar for this project and Pegasus Health (Charitable) for supplying the data.


  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8.
  9. 9.
  10. 10.
  11. 11.
  12. 12.
  13. 13.
  14. 14.
  15. 15.
  16. 16.
  17. 17.
  18. 18.
  19. 19.
  20. 20.
  21. 21.
  22. 22.
  23. 23.
  24. 24.
  25. 25.
  26. 26.
  27. 27.
  28. 28.
  29. 29.
  30. 30.
  31. 31.


  • Contributors OC: The research fellow who collated all data, performed initial analysis and is the main author of this article in drafting and revision of the article critically for important intellectual content and gave final approval of the article prior to submission for publication. JW: The biostatistician who made substantial contribution to study design, analysis and interpretation of data, revising the article critically for important intellectual content and gave final approval of the article prior to submission for publication. DM: Supervisor on the project who provided substantial contribution to conception and study design and gave final approval of the article prior to submission for publication. BM-G: A Pegasus Health (Charitable) collaborator on data acquisition from the New Zealand Health Information Service (NZHIS), where de-identified pharmaceutical dispensing data are made available to researchers. PB: A Pegasus Health (Charitable) collaborator on data acquisition from the New Zealand Health Information Service (NZHIS), where de-identified pharmaceutical dispensing data are made available to researchers.

  • Funding The authors have not declared a specific grant for this research from any funding agency in the public, commercial or not-for-profit sectors.

  • Competing interests None declared.

  • Patient consent Not required.

  • Ethics approval This project is approved by the University of Otago Human Ethics Committee (Health) (reference number HD16/061) on satisfaction that this study is consistent with Rule 11(2)(c) of the Health Information Privacy Code 1994.

  • Provenance and peer review Not commissioned; externally peer reviewed.

  • Data sharing statement Technical appendix, statistical code and dataset available from the corresponding author who may be contacted at

Request Permissions

If you wish to reuse any or all of this article please use the link below which will take you to the Copyright Clearance Center’s RightsLink service. You will be able to get a quick price and instant permission to reuse the content in many different ways.