Metformin use and risk of cancer in patients with type 2 diabetes: a cohort study of primary care records using inverse probability weighting of marginal structural models

Previous studies provide conflicting evidence on whether metformin is protective against cancer. When studying time-varying exposure to metformin, covariates such as body mass index (BMI) and glycated haemoglobin (HbA1c) may act as both confounders and causal pathway variables, and so cannot be handled adequately by standard regression methods. Marginal structural models (MSMs) with inverse probability of treatment weights (IPTW) can correctly adjust for such confounders. Using this approach, the main objective of this study was to estimate the effect of metformin on cancer risk compared with risk in patients with T2DM taking no medication.

Patients with incident type 2 diabetes (T2DM) were identified in the Clinical Practice Research Datalink (CPRD), a database of electronic health records derived from primary care in the UK. Patients entered the study at diabetes diagnosis or the first point after this when they had valid HbA1c and BMI measurements, and follow-up was split into 1-month intervals. Logistic regression was used to calculate IPTW; then the effect of metformin on all cancers (including and excluding non-melanoma skin cancer) and breast, prostate, lung, colorectal and pancreatic cancers was estimated in the weighted population.

A total of 55 629 T2DM patients were alive and cancer-free at their study entry; 2530 people had incident cancer during a median follow-up time of 2.9 years [interquartile range (IQR) 1.3-5.4 years]. Using the MSM approach, the hazard ratio (HR) for all cancers, comparing treatment with metformin with no glucose-lowering treatment, was 1.02 (0.88-1.18). Results were robust to a range of sensitivity analyses and remained consistent when estimating the treatment effect by length of exposure. We also found no evidence of a protective effect of metformin on individual cancer outcomes.

We find no evidence that metformin has a causal association with cancer risk.