Main

Liver cancer is the fifth most frequently occurring cancer worldwide and the third most common cause of cancer mortality (International Agency for Research on Cancer, 2014). Established risk factors for liver cancer include infection with hepatitis B virus (HBV) or hepatitis C virus (HCV), excessive alcohol consumption, aflatoxin consumption, obesity, and diabetes (McGlynn and London, 2011). Type II diabetes has been reported to confer a two- to four-fold risk of liver cancer, increasing with diabetes severity and duration (Adami et al, 1996; El-Serag et al, 2006; Wang et al, 2012). Potential mechanisms for this increase include insulin resistance, compensatory hyperinsulinaemia, and increased growth factor production. In addition, insulin and its precursors may interact with liver cells to stimulate carcinogenesis (Adami et al, 1996).

Because of the diabetes–liver cancer association, it has been suggested that anti-diabetic medication use could modify the risk. Metformin, a widely prescribed anti-diabetic drug that reduces levels of both circulating glucose and insulin, is often prescribed as a first-line treatment for type II diabetes. Individuals with type II diabetes often progress to use other oral hypoglycaemic (OH) drugs, including sulfonylureas, thiazolidinediones, glinides, alpha-glucosidase inhibitors, and ultimately, insulin. The association between use of these anti-diabetic medications and the risk of liver cancer has been explored in prior studies (Oliveria et al, 2008; Donadon et al, 2010; Hassan et al, 2010; Kawaguchi et al, 2010; Lee et al, 2011; Nkontchou et al, 2011; Ruiter et al, 2012; Chen et al, 2013) and meta-analyses (Franciosi et al, 2013; Singh et al, 2013; Zhang et al, 2013). Several of these studies have reported a protective effect for the use of metformin, with estimates ranging from 0.1 to no significant difference for use of metformin vs no metformin use, while the three recent meta-analyses report corresponding protective effects ranging between 0.24 and 0.50. In contrast, insulin has been reported to confer a higher risk of cancer (Bowker et al, 2006; El-Serag et al, 2006; Decensi et al, 2010; Singh et al, 2013).

Anti-diabetic medications are often prescribed in a stepwise manner, starting with metformin and progressing to insulin, and decisions concerning anti-diabetic prescribing are closely correlated with and influenced by diabetes severity and duration. Owing to this, confounding by indication is a serious concern for observational studies evaluating the association of liver cancer in relation to anti-diabetic medication use. In most published studies to date, persons who took a particular anti-diabetic drug were compared with persons who took other anti-diabetic drugs (Oliveria et al, 2008; Donadon et al, 2010; Hassan et al, 2010; Kawaguchi et al, 2010; Lee et al, 2011; Nkontchou et al, 2011; Ruiter et al, 2012; Chen et al, 2013). As such, in these studies metformin users were compared to persons treated with other anti-diabetic drugs including insulin and other OH medications. Insulin is typically prescribed late in type II diabetes disease progression, thus the risk of liver cancer among persons using insulin is likely higher than the risk among persons using metformin. Comparisons such as these are biased toward finding a protective effect of first-line drugs and an increased risk of last resort drugs. To account for these important biases, we conducted a nested case–control study of a large, prospectively collected medical record database to examine the association between anti-diabetic medications and primary liver cancer in comparison with non-use of any anti-diabetic medication.

Materials and methods

Data source

This nested case–control study was conducted using data from the United Kingdom (UK) Clinical Practice Research Datalink (CPRD), a large, population-based, automated medical record database that contains medical data on 10 million people. The UK National Health Service (NHS) provides universal coverage, therefore no segment of the population is excluded from the CPRD and the age and gender distributions are representative of the UK population (Lawson et al, 1998). The general practitioners (GPs) who contribute data to the CPRD have agreed to provide the data in an anonymous format for research purposes and have been trained to record demographic data, as well as medical information including medical diagnoses, details of hospital stays, and deaths. Diagnoses, physical findings, symptoms, and administrative events such as referrals to specialists are recorded using Read codes. Detailed information is available for all medications prescribed by the GP. Because the GP is the primary caregiver for all patients in the NHS, consultants send discharge or referral letters to the GP after seeing a patient and the GP is responsible for prescribing all medications recommended by the specialist. Several studies have been published on the validity of information recorded in the CPRD (Jick et al, 1991, 1992, 2003), and indicate that the data are reasonably complete and accurate with regard to clinical illnesses diagnosed by the GP or a consultant physician. Specifically, >90% of information from the manual medical records present in the GP’s office was recorded on the computer (Jick et al, 1991, 1992, 2003) and 95% of all computer identified primary cancer cases were confirmed as incident cancer (Jick et al, 1997).

Study population

The population from which cases and controls were selected was all persons present in the CPRD from 1988 through 2011 (end of data collection) who were between the ages of 10 and 90 years and had a diagnosis of type II diabetes.

Cases and controls

Cases were drawn from all persons with a first-time diagnosis of primary liver cancer (Read codes B150300, B150z00, and B152.00) in the study population. Cases were required to have at least 3 years of recorded activity in the database before the liver cancer diagnosis date, and to have a diagnosis of type II diabetes recorded before the index date. In order to preclude persons with secondary liver cancer, cases were excluded if they had a prior diagnosis of lung, stomach, breast, colon or pancreatic cancer at any time, or a diagnosis of any other cancer (except non-melanoma skin cancer) in the 3 years prior to the liver cancer diagnosis date. In addition, persons with a code for liver metastases at any time were excluded. To account for an induction period, the index date was defined as the date of the first recorded liver cancer diagnosis minus one year.

Controls were selected from among persons in the study population with no diagnosis of liver cancer, matched to cases at a four-to-one ratio on age (same year of birth), sex, general practice, index date (one year prior to case’s liver cancer diagnosis date) and number of years of recorded history in the CPRD prior to the index date of the matched case. All controls were required to have a type II diabetes diagnosis recorded before the index date, at least 2 years of history in the data prior to the index date, and to be free of any cancer (except non-melanoma skin cancer) prior to the index date.

Exposure to anti-diabetic medications

We assessed the use of metformin, other OH medications (sulfonylureas, thiazolidinediones, glinides, or alpha-glucosidase inhibitors) and insulin at any time before the index date for cases and controls. As a proxy for diabetes severity, we defined six categories of exposure according to type and combination of anti-diabetic medication: metformin-only, other OH-only, metformin+OH, metformin+insulin, other OH+insulin, and insulin-only. Non-use, the reference group, was defined as receipt of one or no anti-diabetic prescriptions prior to the index date.

To replicate the analyses of previously published studies, we also conducted analyses restricted to persons treated for diabetes (persons who had received one or more prescriptions for any anti-diabetic medication before the index date) with three separate comparisons: metformin users vs metformin non-users, other OH users vs other OH non-users, and insulin users vs insulin non-users.

Covariates

We assessed whether cases and controls had a history of known or suspected liver cancer risk factors including alcohol abuse, infection with HBV and/or HCV, rare metabolic disorders (hemochromatosis, Wilsons disease, alpha-1 antitrypsin deficiency, and porphyrias), statin and paracetamol use (defined as receipt of one or more prescriptions prior to the index date), body mass index (BMI; <18.5, 18.5–25, 25–29.9, >30 kg m−2, and unknown) and smoking status (none, current, past, and unknown). Duration of diabetes history was defined as the time from the first diabetes diagnosis through the index date, stratified into four categories (0–1, 2–4, 5–9, 10+ years, and unknown). We also evaluated HbA1c (glycated hemoglobin) levels as an indicator of diabetes severity, evaluating the last laboratory measure before the index date (7.5%, >7.5%, or no laboratory values recorded), as well as number of elevated HbA1c laboratory values, defined as >7.5% recorded before the index date.

Statistical analyses

To evaluate the relationship between anti-diabetic medication use and the risk of liver cancer we conducted conditional logistical regression analyses using SAS statistical software version 9.2 (SAS Institute, Cary, NC, USA) to calculate crude and adjusted odd ratios (ORs) and 95% confidence intervals (95% CI). Age, sex, calendar time, and general practice were controlled through matching. We constructed three separate adjusted models, adjusted for various risk factors and confounders. The risk factor-adjusted model included known or suspected liver cancer risk factors in the analyses including BMI, smoking status, alcohol abuse, HBV and/or HCV, rare metabolic disorders, and statin and paracetamol use. The second model, duration of diabetes-adjusted model, was used because duration of diabetes history is both a strong risk factor for liver cancer and influences prescribing of anti-diabetic medications. Finally, we created a third model combining adjustment for both risk factors and duration of diabetes. We repeated the analysis restricted to cases and matched controls who had (1) <5 years of diabetes history and (2) 5 years of diabetes history.

We conducted two stratified analyses to assess effect modification, by sex and by age group (<60 and 60 years). We also conducted two sensitivity analyses. The first assessed potential misclassification of liver cancer cases by restricting the analysis to cases with clinical codes that indicated either a diagnostic examination (liver biopsies), treatment (chemotherapy, radiotherapy, or surgery), palliative care, and/or referrals to specialty care, and their matched controls. The second sensitivity analysis, to evaluate the accuracy of the latency period, used an index date of 2 years prior to the case’s date of liver cancer diagnosis, rather than 1 year.

The protocol for this study was reviewed and approved by the Independent Scientific Advisory Committee of the CPRD.

Results

We identified 305 cases of liver cancer among persons with type II diabetes and 1151 matched controls with type II diabetes in the CPRD who met all eligibility criteria. The majority of the cases (N=265, 86.9%) had clinical codes in their record that supported the presence of liver cancer. There were 40 cases (13.1%), however, who had no supporting clinical codes recorded. These cases included persons who either died shortly after the liver cancer diagnosis (N=35) or had the cancer diagnosis recorded at the time of their death (N=5). Table 1 displays the characteristics of the cases and matched controls and the univariate analysis of known risk factors for liver cancer. Cases were more likely than controls to be current or former smokers, have alcohol-related disorders, HBV and/or HCV infection, rare metabolic disorders, or to have received prescriptions for paracetamol. Cases also had longer history of diabetes than controls; 46.2% of cases had 5+ years history of type II diabetes (mean 8.2, s.d.±5.8 years) compared to 35.0% of controls (mean 6.3, s.d.±4.8 years).

Table 1 Characteristics of cases and controls and univariable effects in relation to liver cancer

In Table 2, we classified exposure by type and combination of anti-diabetic prescribed as a proxy for diabetes severity: metformin-only, other OH-only, metformin+other OH, metformin+insulin, other OH+insulin, and insulin-only. The risk factor-adjusted OR for metformin-only was 0.85 (95% CI 0.53–1.37), whereas the risk factor-adjusted ORs for all other categories of exposure were 1.2 or greater. After adjustment for duration of diabetes on its own, the OR for metformin-only was 0.62 (95% CI 0.40–0.96), while the duration of diabetes-adjusted ORs for all other categories of exposure were consistent with no difference (ORs 1.0). However, after controlling for both liver cancer risk factors and duration of diabetes history, the ORs for all exposure categories yielded no statistically significant association between anti-diabetic medication use and liver cancer, although use of metformin-only was associated with a small, non-statistically significant, reduction in risk (risk factor and duration of diabetes-adjusted OR=0.74 (95% CI 0.45–1.20).

Table 2 Anti-diabetic medication exposure among liver cancer cases and controls

The mean duration of diabetes increased as exposure category progressed. The mean duration of diabetes was 3.8 years (s.d.±3.7) for the non-use referent group compared to 5.0 years (s.d.±3.8) for metformin-only, 5.9 years (s.d.±4.5) for other OH-only, 8.7 years (s.d.±4.7) for metformin+other OH, 12.4 years (s.d.±4.9) for metformin+insulin, 10.9 years (s.d.±6.4) for other OH+insulin, and 8.1 years (s.d.±5.6) for insulin-only (P-trend <0.0001). In addition, the number of patients with elevated HbA1c levels and number of elevated tests before the index date increased as exposure category progressed. Only 11.1% of patients in the non-use referent group had one or more high HbA1c laboratory values recorded before the index date, while 60% of metformin-only users, 51% of other OH-only users, and 80% or more of users in all other exposure categories had one or more high HbA1c values before the index date (P-trend <0.0001).

Table 3 shows the analysis stratified on duration of diabetes (<5 and 5 years). Among persons with <5 years diabetes duration, the risk factor and duration of diabetes history-adjusted OR for liver cancer with use of metformin-only was 0.74 (95% CI 0.31–1.77), 1.13 (95% CI 0.41–3.10) for use of other OH-only, and 2.27 (95% CI 0.81–6.40) for use of metformin+other OH. Among persons with 5 years diabetes duration, the risk factor and duration of diabetes history-adjusted OR for use of metformin-only was 0.56 (95% CI 0.25–1.23), 0.96 (95% CI 0.44–2.12) for use of other OH-only, 0.83 (95% CI 0.45–1.56) for use of metformin+other OH, and 0.94 (95% CI 0.40–2.18) for use of metformin+insulin. There were too few exposed cases and controls to calculate ORs for the other exposure categories.

Table 3 Anti-diabetic medication exposure among liver cancer cases and controls stratified by length of diabetes history

Two stratified analyses were conducted to assess the potential for effect modification. The vast majority of cases were aged 60 years or older (86%) and 84% were male. Stratification by age yielded no differences in results. Stratification by sex also produced no significant difference in results, although the odds ratio for metformin-only use among women (risk factor and duration of diabetes-adjusted OR=0.28; 95% CI 0.06–1.31, based on six cases and 55 controls) was lower than for metformin-only use among men (risk factor and duration of diabetes-adjusted OR=0.87; 95% CI 0.51–1.48, based on 32 cases and 165 controls). Data not shown.

Two sensitivity analyses were also conducted. In the first one, we assessed the accuracy of our case definition by restricting the analysis to the 265 cases with codes supporting the liver cancer diagnosis and 1002 matched controls. In this analysis, compared to non-use, the risk factor and duration of diabetes-adjusted OR for use of metformin-only was 0.58 (95% CI 0.34–1.01), while the estimates for use of all other anti-diabetic medications or combinations were not materially different from the main analysis (risk factor and duration of diabetes-adjusted ORs were 1.0). In the second sensitivity analysis to evaluate the appropriateness of the induction period window, we moved the index date to 2 years before the liver cancer diagnosis date and reassessed exposure status. The results of this analysis were similar to those of the full analysis, where the risk factor and duration of diabetes-adjusted OR for use of metformin-only was 0.81 (95% CI 0.49–1.34) and the estimates for all other exposures were 1.0. Data not shown.

In order to compare the results of the current study to those of previously published studies we restricted the data to cases (N=234) and controls (N=835) who received at least one prescription for an anti-diabetic medication and compared use of each type of anti-diabetic medication to non-use of that medication (Table 4). Metformin use was associated with a decreased risk of liver cancer (crude OR=0.59 (95% CI 0.39–0.90)) compared to metformin non-use, whereas the users of other OH and insulin were associated with elevated risk of liver cancer compared to non-use of these medications (crude ORs=1.84 (95% CI 1.25–2.70) and 1.81 (95% CI 1.20–2.72), respectively). The ORs for use of metformin-only did not materially change after adjusting for risk factors and, separately, duration of diabetes; but the estimates for other OH and insulin were mitigated (i.e., closer to 1.0) in these models. However, after adjusting for risk factors and duration of diabetes concomitantly, all estimates yielded no differences in the measures of association by exposure categories, consistent with our main models shown in Tables 2 and 3.

Table 4 Comparisons consistent with published studies, restricted to patients with 1+ anti-diabetic medication prescriptions

Discussion

In this large nested case–control study of liver cancer in persons with type II diabetes, use of various types of anti-diabetic medications was not associated with development of liver cancer. To our knowledge this is the first study in a population of people with type II diabetes to evaluate the association of anti-diabetic medications and liver cancer using a comparator group of non-users of any anti-diabetics drug. Consistent use of this reference group enabled us to compare estimates for various anti-diabetic medications and interpret the results accounting for diabetes duration and severity, and prescribing practices, which has significantly expanded the evidence in this area.

Several observational studies have reported that treatment with metformin is associated with a significant reduction in the risk of liver cancer (Oliveria et al, 2008; Donadon et al, 2010; Hassan et al, 2010; Kawaguchi et al, 2010; Lee et al, 2011; Nkontchou et al, 2011; Ruiter et al, 2012; Chen et al, 2013). Most studies, however, compared metformin use with use of other anti-diabetic medications. A cohort study conducted in a French liver cancer clinic reported an adjusted hazard ratio of 0.22 (95% CI 0.05–0.97) for metformin-treated patients compared to non-metformin-treated patients (Nkontchou et al, 2011). A record linkage study conducted using the Taiwan National Health Insurance Research Database (NHIRD) reported an adjusted hazard ratio of 0.06 (95% CI 0.02–0.16) for the same comparison (Lee et al, 2011), while a case–control study using the Taiwan NHIRD reported an OR of 0.79 (95% CI 0.75–0.83; (Chen et al, 2013). A case–control study conducted in an Italian hospital setting (Donadon et al, 2010) reported an OR of 0.15 (95% CI 0.04–0.50) for use of metformin compared to use of insulin and sulfonylureas. A hospital-based case–control study in the USA also reported a significant reduction in liver cancer risk with use of metformin (adjusted OR=0.3, 95% CI 0.2–0.6) (Hassan et al, 2010). In contrast, a retrospective cohort study of an insurance claims database in the USA (Oliveria et al, 2008) and a nested case–control study in a database of Japanese hospitals specializing in liver disease management (Kawaguchi et al, 2010) reported no significant differences in the risk of liver cancer with use of metformin compared to use of other anti-diabetic drugs.

Three meta-analyses published in 2013 evaluated the association between metformin and liver cancer. One of these meta-analyses reported an OR of 0.44 (95% CI 0.32–0.62) for metformin use compared to non-use of metformin (Franciosi et al, 2013), and a second reported an OR of 0.50 (95% CI 0.34–0.73) that persisted in a subgroup analysis, which adjusted for the effect of diabetes duration or severity (OR=0.40, 95% CI 0.16–0.98; (Singh et al, 2013). The third meta-analysis reported a pooled relative risk of 0.24 (95% CI 0.13–0.46) for use of metformin compared to non-use of metformin (Zhang et al, 2013). All three meta-analyses reported a high degree of heterogeneity in the included studies. Meta-analyses, however, only incorporate the ORs and 95% CIs of published studies; they do not reanalyse the data to harmonise the comparison groups or standardise the model adjustments. Consistent across all published studies conducted in persons with diabetes who received anti-diabetic prescriptions was that users of metformin were compared to users of other anti-diabetic medications. In addition, most prior studies adjusted for few covariates besides age and sex, and many did not adjust for diabetes duration (Donadon et al, 2010; Hassan et al, 2010; Lee et al, 2011; Chen et al, 2013). Evaluating the risk of liver cancer among users of metformin compared to users of other anti-diabetic medications, specifically users of insulin, is likely to overestimate the protective effect of metformin since the risk of liver cancer has been shown to increase with increasing duration of diabetes. Metformin is often a first-line treatment for patients with type II diabetes and therefore is prescribed to patients with shorter history and less severe disease, whereas users of insulin have severe diabetes of longer duration. When we reanalysed our data using the same comparisons as were previously reported, our crude results, which were conditional on the matching factors (age, sex, general practice, and index date), were consistent with those reported in previous publications. Most of the previous studies adjusted for age and sex and some of the studies also adjusted for hepatitis B and or C or other liver cancer risk factors; however, very few of the studies adjusted for diabetes or duration of diabetes. Therefore, the appropriate estimate for comparison with previous studies is our crude OR of 0.59 (95% CI 0.39–0.90) for use of metformin compared to no metformin, which is similar to the estimates reported in the three recent meta-analyses (0.24–0.50). However, after we adjusted for liver cancer risk factors and duration of diabetes, all of our estimates were consistent with no effect.

As a proxy for diabetes severity, we classified exposure to anti-diabetic medication by the type and combination of medications prescribed and used a non-use comparator. In theory, if metformin is protective then it should be protective regardless of concomitant anti-diabetic medication use. However, after controlling for liver cancer risk factors and duration of diabetes, ORs increased with each additional anti-diabetic medication received. We evaluated our assumption that our exposure categories were consistent with increased severity of diabetes by evaluating HbA1c laboratory measures. This was also useful for evaluating whether our reference group (patients with type II diabetes who did not receive anti-diabetic medication prescriptions) had good glucose control and were not at a higher baseline risk for liver cancer because they had uncontrolled diabetes. The number of patients with elevated HbA1c levels and number of elevated tests before the index date increased as exposure category progressed. This lends support to our assumption that our exposure categories were a good proxy for diabetes severity at the index date and that our reference group did not consist of patients with uncontrolled diabetes. In addition, mean duration of diabetes was lowest in the non-use reference group and increased as exposure category progressed, further supporting the assumption that the non-use reference group had the lowest baseline risk for liver cancer. Use of this reference group for all comparisons is a strength of our study because it minimised bias resulting from use of changing reference groups and allowed us to evaluate the difference in risk with each type and combination of anti-diabetic medication in comparison to a single reference group.

In our study, patients with diabetes who received metformin-only had a consistently lower risk of liver cancer compared to non-users of any anti-diabetic medications, while the risks for use of all other medications or combinations in comparison to non-use were 1.0. A larger proportion of the metformin-only exposure category had elevated HbA1c laboratory values and also had longer duration of diabetes history compared to the non-use reference group; therefore the metformin-only exposed patients should have a higher baseline risk of liver cancer compared to the non-use reference group. Despite this, users of metformin-only yielded a clinically relevant, albeit not statistically significant, protective effect (risk factor and duration of diabetes-adjusted OR=0.74 (95% CI 0.45–1.20) in comparison to non-use of anti-diabetic medications. This estimate is compatible with a small protective effect of metformin-only in comparison to non-use. After stratification on length of diabetes history, this protective effect remained in those with <5 years of diabetes history (risk factor and duration of diabetes-adjusted OR 0.74 (95% CI 0.31–1.77) and strengthened among those with 5 years of diabetes history (risk factor and duration of diabetes-adjusted OR=0.56 (95% CI 0.25–1.23). The numbers are small in this stratified analysis and therefore result in a lack of power and increased type II error, but, similar to the full analysis, the data are compatible with a modest protective effect with the use of metformin-only in comparison to non-use of anti-diabetic medications.

Also of note, the risk factor and duration of diabetes-adjusted OR for use of other OH-only was 1.10 (95% CI 0.66–1.84) compared to non-use. In theory, based on the UK prescribing guidelines (NICE, 2014), these persons should have similar severity and duration of diabetes as metformin-only users. In our study, metformin-only and other OH-only had similar proportions of patients with elevated HbA1c laboratory values and similar length of diabetes history. The OH-only exposure category was composed of users of sulfonylureas, thiazolidinediones, glinides, and glucosidase inhibitors. More than 80% of other OH-only users in this study were exposed to sulfonylureas only, while 12% received multiple other OH types. Sulfonylureas have been associated with hyperinsulinaemia, which may increase the risk of liver cancer (Bowker et al, 2006; Decensi et al, 2010). In contrast, metformin has been shown to have antineoplastic effects (Gallagher and LeRoith, 2011). Considering all the evidence, the consistency of protective effects of metformin-only in comparison to non-use in all analyses in this study, and the contrast with estimates for use of other OH-only, we cannot rule out a modest, clinically relevant reduction in the risk of liver cancer with use of metformin.

Our population-based study had a number of strengths. We used a very large and well-established, validated, longitudinal primary care database, the CPRD, which is known for high accuracy of diagnoses, including cancer diagnoses, and completeness of drug prescribing data. This enabled us to identify and validate one of the largest series of liver cancer cases studied to date in a Western population. As all information on diseases and drug exposures is recorded in the absence of a study hypothesis there is no risk of recall bias. Because the GPs record individual prescriptions we were able to categorise exposure by type of anti-diabetic medication received. In our study the mean length of medical record before the index date, in which covariate and exposure status was assessed, was >12 years for both cases and controls. We further controlled our analyses for a range of potential confounders, including duration of diabetes history, BMI, smoking status, and liver cancer risk factors (alcohol abuse, HBV and/or HCV, and statin and paracetamol use). By excluding cases and controls who had <2 years of history in their medical record before the index date we reduced the risk of including prevalent, rather than incident, liver cancer cases. Because we did not rely on prescription records for anti-diabetic medications to identify patients with type II diabetes in this study we were able to use a common non-use reference group for all comparisons. Finally, we conducted two sensitivity analyses each of which yielded consistent findings.

Several potential limitations were also present. We may have missed some cases of liver cancer; however, it is unlikely that any missed cases would have had a differential use of anti-diabetic medications and thus it would not have affected our results. The CPRD has been used numerous times for studies on various cancers and previous validation studies indicate that cancer diagnoses recorded in the CPRD are accurate (Jick et al, 1997). It is possible that some cases were secondary or metastatic liver cancers and not primary liver cancers. To minimise this type of misclassification we excluded patients with any prior cancer diagnosis (except non-melanoma skin cancer) in at least the 3 years prior to the liver cancer diagnosis and further excluded patients whose record indicated that their liver cancer diagnosis was a liver metastases. The majority of the cases (86.7%) had clinical codes consistent with a liver cancer diagnosis in their record providing confidence in the liver cancer diagnosis. In a sensitivity analysis restricted to these cases (i.e., those with supporting clinical codes) and their matched controls, we found no material differences in the results, adding confidence that case misclassification did not materially impact our results. We restricted the study population to patients with type II diabetes, thus our study is only generalisable to these patients; therefore, our results do not evaluate whether metformin could be protective in patients without diabetes. The CPRD does not adequately capture information on race so we were not able to evaluate the effect of race in this study. The majority of UK residents are Caucasian so this limitation should not have a strong effect on the results, though these results are mainly generalisable to Caucasians. It is possible that we missed a history of HBV or HCV infection if the infection happened before a patient joined the current practice and it was not recorded by the GP as an historical diagnosis, thus some information on history of viral hepatitis status may be missing, although it is unlikely that this would differentially affect the results.

In conclusion, use of any anti-diabetic medication was not associated favourably or adversely with liver cancer in this study, although use of metformin-only was associated with a consistent, yet non-statistically significant, protective effect in comparison to non-use. Diabetes duration and severity and choice of anti-diabetic medication are inextricably linked and anti-diabetic drug use patterns are associated with diabetes severity and length of diabetes history; thus any differences in estimates between different exposure categories may be explained by the duration and severity of diabetes. Future studies to evaluate the association between anti-diabetic medications and risk of liver cancer must consider duration and severity of diabetes in the study design and analysis.