Introduction

Epidemiological studies have long sought to identify the clinical variables that contribute to incident cardiovascular events1. Results from these reports have enabled the construction of tools to estimate individual cardiovascular risk based on clinical data2. However, a significant number of older large-scale longitudinal studies have followed up cohorts that are characteristic of the general population, whereas relatively few have focused specifically on people with diabetes3,4. Similarly, cardiovascular risk factors have been extensively characterized in the population as a whole. However, fewer data have been reported on the specific effects of traditional cardiovascular risk factors in people with type-2 diabetes mellitus (T2DM) in a large representative outpatient cohort from southern Europe. Such data could add to global knowledge.

The contribution of cardiovascular risk factors to the onset of clinical cardiovascular events and optimal targets when treating these factors might differ between the general and the T2DM populations5,6. Consequently, specific risk prediction tools for cardiovascular disease in people with T2DM have been developed7,8.

Another disadvantage of traditional epidemiological studies is that most cohorts are from the U.S. and western Europe, with the result that cardiovascular risk estimation tools seem to perform differently depending on the ethnic, geographical, and social characteristics of the population in which they are used9,10. In recent years, tools to assess the risk of cardiovascular events have been developed in Mediterranean countries, albeit in patients newly diagnosed with type 2 diabetes mellitus11.

Clinical risk factors associated with acute myocardial infarction and stroke may not completely overlap in the T2DM population. In a recent report from Sweden12, the most strongly associated factors for acute myocardial infarction and stroke were glycated hemoglobin level, systolic blood pressure, and physical activity. Regarding lipids, LDL cholesterol had a weaker effect on stroke than on myocardial infarction. For example, for an LDL cholesterol value close to 4 mmol/L, the risk of myocardial infarction increased by 50% (HR 1.50), while the risk for stroke barely reached 10%12, with 2.5 mmol/L as the reference category for these analyses.

Here, we aimed to identify clinical variables that were significantly associated with a first acute myocardial infarction and stroke or transient ischemic attack (TIA) in the T2DM cohort of the Madrid Diabetes Study (MADIABETES) in Spain. The patients analyzed were representative of a Mediterranean population.

Results

In the MADIABETES cohort, we gathered data on 2980 people with T2DM who had not previously experienced a cardiovascular event (24,159 person-years of follow-up). Of these, 1408 patients were men (47.2%) and 1572 were women (52.8%). Mean age was 67.3 ± 11.2 years, with a mean duration of T2DM of 11.8 ± 9.8 years (Table 1). Average chronic glycemic control was good (mean HbA1c = 53.3 ± 11.9 mmol/mol, with one in every six patients already being treated with insulin and one third who had already had retinopathy, neuropathy or nephropathy. Three quarters of the patients had hypertension, and cardiovascular risk, as measured by the adjusted REGICOR risk function, was low (Table 1).

Table 1 Baseline characteristics of the MADIABETES cohort (total population, and according to incident first acute myocardial infarction and incident first stroke/transient ischemic attack).

Incident first acute myocardial infarction

During follow-up, we recorded 114 cases of incident first acute myocardial infarction (62 cases in men and 52 cases in women). The crude and age-standardized incidence rates were 44.03 and 44.39 per 1,000 for males, respectively, and 33.08 and 31.38 per 1,000 for females, respectively (Supplementary Tables S1 and S2).

The incidence density rate of a first acute myocardial infarction was 4.72 cases (95% CI 3.89–5.67) per 1,000 person-years (5.52 [95% CI 4.23–7.08] in men and 4.02 [95% CI 3.00–5.27] in women).

In the bivariate analyses, people who had an incident first acute myocardial infarction showed higher values of systolic blood pressure despite being more often treated with antihypertensive drugs, higher HbA1c values and more frequently having atrial fibrillation, microalbuminuria, and prevalent nephropathy (all nominal p values < 0.05) (Table 1). We found the influence of sex on the association between HbA1c levels and incident first acute myocardial infarction to be heterogeneous: the risk for a man younger than 75 years was similar to that of a woman older than 75 years (Fig. 1).

Figure 1
figure 1

Representation of relationship between HbA1c* values and the Hazard Ratio of Myocardial Infarction, according to sex and age group. *Adjusted for HDL-cholesterol, DBP and albuminuria (Table 2). Dashed red lines indicate the hemoglobin value associated to a lower risk of AMI. Pink lines represent the adjusted effect of HbA1c on the risk of AMI in patients aged 75 years or older. Blue lines represent the adjusted effect of HbA1c on the risk of AMI in patients under 75 years of age.

Incident first stroke/TIA

A total of 185 cases of incident first stroke or TIA were collected during follow-up (72 cases in men and 113 cases in women). The incidence density rate of a first stroke or TIA was 7.66 cases (95% CI 6.60–8.85) per 1000 person-years (6.42 [95% CI 5.02–8.08] in men, and 8.74 [95% CI 7.20–10.51] in women).

The crude cumulative and age-standardized stroke/TIA incidence was higher in females (71.88 and 67.06 per 1000, respectively) than in males (51.14 and 57.18 per 1000, respectively) (Supplementary Tables S3S4).

In the bivariate analyses, people who had an incident first stroke or TIA were older and more frequently women and had a longer duration of diabetes and worse chronic glycemic control. Hypertension, atrial fibrillation, less active smoking, microalbuminuria, nephropathy, a lower glomerular filtration rate, and neuropathy were more prevalent among the people who had a first stroke or TIA during follow-up (all nominal p values < 0.05) (Table 1).

Multivariable analysis of first acute myocardial infarction

In the multivariable model constructed for a first incident of acute myocardial infarction, the significantly highest hazard ratios were found for albuminuria > 300 mg/dL vs. < 30 mg/dL (HR 2.61; 95% CI, 1.04–6.52; p = 0.040), followed by HbA1c > 64 mmol/mol vs. < 53 mmol/mol (HR 1.95; 95% CI 1.24–3.04; p = 0.003), and age ≥ 75 years vs. < 75 years (HR 1.62; 95% CI 1.08–2.42; p = 0.019). On the other hand, the significantly strongest protective factors for acute myocardial infarction were HDL-cholesterol and DBP: HDL-cholesterol values between 0.90 and 1.81 mmol/L (HR 0.50; 95% CI 0.32–0.78; p = 0.002) compared with the reference category of HDL-cholesterol < 0.90 mmol/L; and DBP values between 65 and 80 mmHg (HR 0.41; 95% CI 0.26–0.63; p < 0.001) compared with values below 65 mmHg (Table 2). Supplementary Fig. S2 shows that within an approximate range of 65–85 mmHg, the risk is less than 1 (protective effect), while for values lower or higher than that interval, the risk is higher than 1.

Table 2 Multivariable analysis of factors associated with incident first acute myocardial infarction in the MADIABETES cohort.

Multivariable analysis of first stroke or TIA

In the multivariable model constructed for a first incident stroke or TIA, the variables that were independently associated with onset of a first stroke or TIA were as follows: older age (HR 3.32; 95% CI 1.97–5.58; p < 0.001) for patients > 75 years vs. < 60 years as the reference category; atrial fibrillation, with a higher risk during the first year after the diagnosis (HR 2.64; 95% CI 1.45–4.82; p = 0.001); higher triglyceride levels (HR 1.20; 95% CI 1.02–1.41; p = 0.031) per each 1.13 mmol/L increase; albuminuria (HR 1.94; 95% CI 1.35–2.78; p < 0.001; glomerular filtration rate (HR 2.20; 95% CI 1.55–3.14; p < 0.001) per each 15 mL/min/1.73 m2 decrease; neuropathy (HR 1.73; 95% CI 1.14–2.64; p = 0.01), and retinopathy (HR 1.55; 95% CI 1.06–2.26; p = 0.023). However, total cholesterol levels between 3.88 and 6.46 mmol/L vs. total cholesterol levels < 3.88 mmol/L as the reference category showed an inverse and significant association with stroke or TIA (Table 3).

Table 3 Multivariable analysis of factors associated with incident first stroke/transient ischemic in the MADIABETES cohort.

Discussion

The present study reports data on the risk factors associated with the incidence of first acute myocardial infarction and stroke/TIA in a well-balanced Spanish type 2 diabetes cohort in terms of sex. Glycemic control was optimal (HbA1c = 53.3 mmol/mol) and cardiovascular risk low, as measured by the adjusted REGICOR risk function. Furthermore, as patients were from the primary care setting, they were not selected by degree of complexity, as usually happens with patients who require care in hospital or diabetes clinics. Moreover, our study differs from other European cohorts, including Mediterranean cohorts13, in the following items: lower baseline HbA1c level, lower insulin use, and less established microvascular complications such as retinopathy. We think that these differences with other European cohorts justify the present study, which may provide more comprehensive data on risk factors in patients with a low-risk profile.

We found incidence density rates of 4.72 cases/1000 person-years for first acute myocardial infarction and 7.66 cases/1000 person-years for first stroke or TIA in a primary care cohort of people with T2DM from a Mediterranean country who were free of cardiovascular events at baseline. Age independently predicted both first acute myocardial infarction and first stroke or TIA. Chronic poor glycemic control, low HDL-cholesterol, and low diastolic blood pressure were independently associated with first acute myocardial infarction alone, whilst atrial fibrillation, total cholesterol and triglyceride levels, albuminuria, lower glomerular filtration rate, neuropathy and retinopathy were exclusively associated with first stroke or TIA.

The cumulative incidence of myocardial infarction and stroke was lower in our study than in other, similar studies14, probably because our cohort comprises patients with a low risk of cardiovascular events, as measured using the REGICOR adjusted function (a calibration of the Framingham algorithm adapted for Spain)15.

Regarding incidence rates per 1000 person-years, it is difficult to compare our results with those of other investigations owing to the marked differences arising from the age of the participants in these studies. In the USA, Mozaffarian et al.16 reported rates for incident acute myocardial infarction ranging between 0.8 and 9.1 cases/1000 person-years among white men and between 0.2 and 7.8 cases/1000 person-years among white women according to age group. In the same study, rates for incident stroke/TIA ranged between 2.4 and 12.2 cases/1000 person-years among white men and between 2.4 and 9.9 cases/1000 person-years among white women according to age group. Holman et al.17 reported 16.8 cases of acute myocardial infarction/1000 person-years and 6.3 cases of stroke/1000 person-years in people with intensively treated T2DM. In the CAPAMIS study, a population-based cohort including 27,204 people older than 60 years in Tarragona (Spain)18, the incidence of acute myocardial infarction was 9.14 per 1000 person-years. The incidence was two-fold higher than in our cohort despite similar ages at baseline. A possible explanation for the differences between our study and CAPAMIS is that we excluded patients with previous cardiovascular events at baseline, with the result that the number of acute myocardial infarctions was low.

The role of lipid levels as predictors of coronary heart disease in the Mediterranean population has been highlighted by previous research. Orozco-Beltran et al.19 showed that low HDL-cholesterol (< 35 mg/dL) was the biochemical parameter with the strongest association with acute myocardial infarction in a Mediterranean population. Another study in the T2DM Spanish population showed that the ratio of non–HDL-cholesterol to HDL-cholesterol was a significant predictor of cardiovascular events, whilst no significant associations were observed for LDL-cholesterol and total cholesterol11. Likewise, the ERICE score, a new native cardiovascular score for the low-risk, elderly Mediterranean population of Spain, claimed that the contribution of serum total cholesterol to coronary heart disease was small20.

However, the effect of dyslipidemia on stroke is unclear, as has been shown in observational studies and a 1995 meta-analysis21 of 45 prospective cohorts. In fact, in 1994, D’Agostino et al.22 developed a prediction rule for the 10-year risk of stroke in primary prevention that did not include dyslipidemia. A further meta-analysis of observational studies on primary or secondary prevention of cardiovascular disease23 did not show an association between total serum cholesterol and fatal stroke. However, it did show a reduction in the cumulative incidence of stroke (total and non-fatal), probably owing to the lower risk of ischemic stroke, as reported elsewhere24,25,26.

The recent observational study by Rawshani et al.12 in patients with DM2 showed an association between LDL cholesterol and stroke. However, the relative importance for predicting stroke was weaker than for other variables, such as systolic blood pressure, atrial fibrillation, smoking, glycated hemoglobin, and duration of diabetes, and similar for diastolic blood pressure, body mass index, heart failure, and albuminuria.

On the other hand, the CARDS clinical trial in T2DM patients showed that lipids did not predict stroke27. However, the effect of statins on stroke in patients with diabetes has been observed in several clinical trials and confirmed in the Cholesterol Treatment Trialists' 2008 study28 on 18,686 people with diabetes in 14 randomized trials evaluating statins (OR = 0.79; 99% CI 0.67–0.93; p = 0.0002).

In our study, total cholesterol values between 3.88 and 6.46 mmol/L had a significant protective effect on stroke/TIA compared with levels lower than 3.88 mmol/L. This unexpected finding could mean that in primary prevention for patients with type 2 diabetes and low cardiovascular risk, intermediate total cholesterol values have incidence rates of ischemic stroke lower than < 3.88 mmol/L. In a similar sense, other studies29 in people with a low risk of vascular disease (< 5%) showed that, for each 1.0 mmol/L reduction in LDL cholesterol with statins, the RR (95% CI) for stroke was 0.74 (0.46–1.19), suggesting that the findings are not conclusive, given that the confidence interval includes a potential reduction in the incidence of stroke of 54% (appreciable benefit) or even an increase of 19% (harm).

The multinational INTERHEART Study emphasized that common risk factors underlie cardiovascular disease worldwide30, although variations in the attributable risk of each condition can be found depending on regional singularities.

We found that diastolic pressure lower than 65 mmHg was associated with a first acute myocardial infarction. This association has been described in previous studies 31 and is thought to be related to the fact that diastolic blood pressure below a critical level cannot ensure coronary flow during diastole32. Moreover, a similar J-shaped distribution was observed for values between 65–85 mmHg and > 85 mmHg. This distribution of DBP has previously been described for ischemic heart disease33. In Spain34, a reduction in the relative risk of cardiovascular disease has been described for values between 76 and 83 mmHg (RR = 0.75). The reduction is less intense for values ≥ 75 mmHg (RR = 0.88) with respect to DBP ≥ 84 mmHg. Our findings had a similar distribution, given that values < 65 mmHg were associated with a greater incidence of AMI than values between 65 and 85 mmHg (HR 0.41; 95% CI 0.26 to 0.63; p < 0.001) and values higher than 85 mmHg (HR 0.60; 95% CI 0.30–1.21; p = 0.155).

We also observed an association between HbA1c and incident acute myocardial infarction. The role of long-term close glycemic control to prevent macrovascular disease has been questioned by some reports6, even though most studies identify HbA1c to be independently associated with incident acute myocardial infarction35 and despite previous research underscoring the cardiovascular benefits of more intensive lowering of HbA1c36. In our study, HbA1c levels of around 48 mmol/mol were associated with the lowest risk of incident first acute myocardial infarction. This HbA1c goal is supported by some authors37,38, whereas other guidelines or recommendations claim less stringent values39,40. Our opinion is that such a strict target can only be considered adequate in older adults treated with diet alone or with drugs that do not cause hypoglycemia. The American Diabetes Association recommends long-term intensive diabetes management in patients who can be expected to live long enough to reap the benefits and whose cognitive and physical function is good41. Furthermore, recent European guidelines42 point out that HbA1c targets should be individualized, with more stringent goals (6.0–6.5% [42–48 mmol/mol]) in younger patients with a short duration of diabetes mellitus and no evidence of cardiovascular disease, if achieved without significant hypoglycemia.

Although diabetic neuropathy has been associated with myocardial ischemia43, in which endothelial dysfunction may be an underlying pathophysiological mechanism44, our findings did not replicate this finding. However, we did find neuropathy to be an independent predictor of incident first stroke or TIA, in accordance with other studies that had previously found an association with combined cardiovascular events (first acute myocardial infarction, cardiac revascularization, heart failure, stroke or TIA)45. Diabetic retinopathy has been associated with incident cardiovascular disease after adjusting for other microvascular and macrovascular complications46. To the best of our knowledge, no studies have associated retinopathy specifically with stroke or TIA, despite the reported association between diabetic retinopathy and acute myocardial infarction47.

The risk of stroke was highest during the first year after diagnosis of atrial fibrillation and decreased thereafter. This phenomenon has been found in other studies48 and could arise from the difficulty associated with achieving an optimal INR range during the first months after diagnosis.

Compared with other studies, we did not find any statistically significant association between active smoking and cardiovascular events30,49. This finding was unexpected, and we are unable to explain it. However, findings from the U.K. Clinical Practice Research Datalink50 have shown differences in the effects of smoking on stroke and myocardial infarction according to metformin use in type 2 diabetes mellitus patients. The hazard ratio for stroke or myocardial infarction was non-significant in current smokers receiving metformin (HR 1.08; 95% CI 0.81–1.45) compared with non-smokers not taking metformin. Therefore, concomitant treatment with metformin attenuates the higher cardiovascular and mortality risk observed in current smokers. In our study, more than 60% of patients received metformin, thus partially explaining the lack of a significant association with smoking.

We were not surprised to see that clinical factors did not overlap to predict acute myocardial infarction and stroke/TIA. As previously mentioned, Rawshani's study showed different risk patterns for stroke and myocardial infarction12. From a pathophysiology standpoint, it makes sense that different risk factors could be associated with each entity: in acute myocardial infarction, plaque rupture and in situ thrombosis are responsible for nearly all cases of transmural ischemia, thus conferring a heavier burden on atherothrombogenic factors; in stroke, factors other than plaque rupture are involved when the source is cardioembolic, in situ thrombosis, or lacunar infarct51.

In a classical epidemiological study of people with T2DM in Italy, researchers found that age, smoking, total/HDL-cholesterol, and HOMA-IR were the factors that best predicted incident cardiovascular disease52. Interesting studies have underscored the potential benefits of the Mediterranean diet and lifestyle for lowering incident cardiovascular events53. Cardiovascular risk factors may behave differently between populations, partly due to specific genetic background, but also due to specific environmental conditions. The interaction between factors might change the influence that each risk factor exerts on the eventual development of clinical cardiovascular disease.

Our study is subject to a series of limitations. The sample was not population-based, but rather drawn from outpatients seen in primary care centers of the Spanish Public Health System. The study was conducted in Madrid, which may not represent the entire Spanish population in terms of income, educational level, lifestyle, and health profile. The target population of this investigation was free of cardiovascular events at baseline; therefore, results might have been different if sought in secondary prevention. Residual confounding due to heterogeneous adherence to medical therapies could not be completely ruled out. A specific limitation of our study was the fact that we did not include socioeconomic status, educational level, physical activity, or alcohol consumption, which would at least have served as adjustment variables. Lastly, the loss follow-up rate was high. We had to take the last follow-up value as the data for analysis for patients who were lost to follow-up. These uncontrollable factors may have led to bias, and the external validity could be restricted to a certain extent.

However, the meticulous and prospective design of the study strengthens our findings. In addition, the fact that data are obtained from current medical practice in our setting provides us with an overall view of actual outcomes in patients with T2DM in our daily clinical practice.

Conclusion

In our study of a Mediterranean T2DM population that was free of cardiovascular events at baseline, incidence density rates for first acute myocardial infarction and first stroke/transient ischemic attack were 4.72 cases and 7.66 cases/1000 person-years, respectively. Age was the only factor independently associated with both outcomes, since none of the remaining clinical factors were simultaneously associated with both outcomes. Additional research is needed to fully characterize predictors of cardiovascular disease in Mediterranean people with prevalent T2DM.

Methods

MADIABETES is a large prospective dynamic cohort study whose characteristics have been described elsewhere54. The first recruitment drive took place in 2007 and enrolled 3443 T2DM outpatients; by the end of 2010, a second recruitment drive added a further 727 T2DM outpatients. The study population was recruited by simple random sampling from primary health care centers in the metropolitan area of Madrid (Spain): 56 patients in the first recruitment drive and 41 in the second. During the follow-up period (2008–2017), general practitioners collected data at the baseline visit (2007 and 2010, respectively) and annually thereafter under conditions of daily clinical practice. The baseline and prospective diagnoses were recorded in the case report form based on the information registered in electronic clinical records and/or hospital discharge reports.

The MADIABETES cohort is the Spanish type 2 diabetes mellitus cohort with the highest number of person-years of follow-up. It is also one of the few Spanish cohorts comprising primary care patients. Findings for the variables recorded—age, sex, time since diagnosis of diabetes, hypertension, dyslipidemia, and microvascular complications—are similar to those of Spanish hospital-based studies55,56 and the data reported by Bodicoat et al.57.

This cohort study was approved by the Institutional Review Board of Ramón y Cajal Hospital (Madrid) and conducted according to the principles of the Declaration of Helsinki. All patients gave their written informed consent to participate.

The database is not available to the public and its use is restricted to research groups affiliated with the MADIABETES consortium, IdIPAZ Health Research Institute, La Paz University Hospital, and IMDEA Food Institute, Madrid (Spain).

The inclusion criteria were age ≥ 30 years and a previous diagnosis of T2DM. We excluded homebound people and patients with type 1 diabetes mellitus.

Type 2 diabetes mellitus was defined based on a reported history of diabetes and/or according to the use of medications to treat diabetes and/or fasting plasma glucose > 125 mg/dL or two‐hour glucose > 200 mg/dL during an oral glucose tolerance test.

HbA1c was measured using the IFCC-calibrated method, as implemented by the central laboratory. We calculated body mass index (BMI) as weight/height2 (kg/m2). Blood pressure was measured twice using a checked, calibrated sphygmomanometer.

Neuropathy was defined as the presence of at least two of the following three criteria: abnormal sensory and/or motor signs, neuropathic symptoms, and absent or decreased tendon reflexes.

Retinopathy was based on the severity scale proposed by Wilkinson et al.58, as used previously by our group54. The scale consists of the presence of any of the following lesions: microaneurysm, intraretinal hemorrhage, venous beading, neovascularization, vitreous/preretinal hemorrhage, cotton wool spots, retinal thickening, and hard exudates.

Information on cigarette smoking was obtained by asking about current and lifetime smoking habits. Current or active smoking was defined as regular cigarette smoking (duration longer than six months) at the time of the examination. Former smoking was defined as a history of smoking for longer than six months and no current smoking. Never smoking was defined as no present or previous history of tobacco smoking.

Missing values were replaced by the last available value closest to the event incidence following the criterion of Altman et al.59.

Outcomes

We developed separate models to explain two outcomes: (a) first event of fatal or non-fatal acute myocardial infarction; and (b) first event of fatal or non-fatal ischemic stroke or TIA.

Patients with a history of angina pectoris, myocardial infarction, stroke, TIA, and peripheral arterial disease (or amputation) registered in the electronic clinical records and/or hospital discharge reports were not included in the analysis cohort. For this analysis, only primary prevention patients were included.

Myocardial infarction was defined according to the Third Universal Definition of Myocardial Infarction60, as this was the definition at the time of the study and/or diagnosis documented in the clinical records.

Stroke was defined as rapid onset of clinical signs of focal or global loss of cerebral function that lasted for > 24 h and that could not be explained by other medical conditions and/or confirmed with brain computerized tomography (CT) scan or magnetic resonance imaging (MRI). Transient ischemic attack (TIA) was defined as the occurrence of neurological symptoms or signs that lasted < 24 h due to an episode of neurological dysfunction caused by focal brain, spinal cord, or retinal ischemia, without acute infarction61.

Angina pectoris was defined as substernal pain or discomfort (with or without radiation to other areas) precipitated by exercise and relieved by rest or sublingual nitroglycerine.

Peripheral arterial disease was defined as the presence of claudication, a history of peripheral artery surgery, and/or an ankle-brachial index less than 0.90 in either leg.

The vital status of each patient (dead or alive) was ascertained on December 31st, 2017, with data from the mortality records of the Spanish National Institute of Statistics (Instituto Nacional de Estadística, http://www.ine.es). Therefore, data about vital status and date and cause of death were available for all patients, with no loss of data during follow-up. The underlying cause of death stated on the death certificates was coded according to the International Statistical Classification of Diseases, Tenth Revision62.

Statistical analysis

We report descriptive data as mean and standard deviation or median and interquartile range. We compared continuous variables between two groups using the t test for normally distributed data and the Mann–Whitney test for non-normally distributed data. Categorical variables were compared using the chi-squared test.

We calculated the cumulative incidence of first acute myocardial infarction and first stroke/TIA by taking the number of new cases as the numerator and the total initial population at risk as the denominator. We determined the number of patient-years at risk of developing first acute myocardial infarction or first stroke/TIA between the baseline appointment date and the date of death, the date of the event of a first acute myocardial infarction or first stroke/TIA, the date of loss to follow-up, or the end of the study period. We estimated incidence density as the number of new cases divided by patient-years at risk. The median follow-up was 9.9 years. We found that 11.4% of patients died and 25.8% were lost to follow-up due to loss of contact (median follow-up, 6.9 years).

The sex- and age-standardized incidence rates were calculated by the direct method based on the age distribution of the entire study population as the reference (Supplementary Tables S1S4).

The objective of our study was not to build a predictive model. We aimed to explain the risk factors most frequently associated with the incidence of AMI and stroke/TIA in patients with type 2 diabetes using clinical, statistical, and pragmatic criteria. We used a multivariable extension of Cox proportional hazard analysis to estimate the adjusted hazard ratios (HRs) and corresponding 95% confidence intervals (CIs).

Initially, we constructed a multivariable model by applying backward elimination (PIN = 0.05, POUT = 0.2, based on the log-likelihood ratio test) (Supplementary Fig. S1) to a set of candidate predictors chosen as potential risk and confounding factors according to previous studies63. The data tested in the two models were as follows: age, sex, duration of diabetes, smoking, BMI, use of antihyperglycemic drugs (insulin, oral antidiabetic agents), statins, and aspirin. The time-varying covariates were systolic and diastolic blood pressure, albuminuria, lipid profile, HbA1c, retinopathy, neuropathy, and atrial fibrillation (only in stroke/TIA model). Both models were stratified by antihypertensive drugs.

The main interaction variables (age, sex) were tested using the chunk test, although the differences were not statistically significant. We checked the proportional hazards assumptions by examining the Schoenfeld residuals and the covariates  time interaction terms and the assumption of a log-linear relationship between the predictors and the hazard function using the residual Martingale. The variables did not violate the assumption of proportional risks in either model, except for atrial fibrillation in the stroke/TIA model. For this variable, hazard ratios were calculated in different monitoring periods (< 1, 1–4, 5–10 years).

HbA1c, HDL-cholesterol, total cholesterol, diastolic blood pressure, albuminuria, and BMI violated the assumption of a log-linear relationship. We considered it more appropriate and practical to categorize the continuous variables that violated this assumption. In addition to clinical criteria, the visual analysis of these variables using the restricted cubic splines function guided us in establishing the most appropriate categories (Supplementary Figs. S2S3).

A sensitivity analysis was performed after excluding stroke cases until three months after diagnosis of atrial fibrillation in order to study the real effect of atrial fibrillation on stroke.

We found no influential values (DFBETA index) or colinearity issues that significantly affected the results.

We evaluated the predictive accuracy of the multivariable Cox model using a bootstrapping method based on the Harrell C index, which is equivalent to the area under the receiver operating characteristic curve for binary dependent variables and replaces time-varying covariates by average values. Although the C index of the model for stroke/TIA (0.70) was somewhat greater than that of AIM (0.66), the discriminatory capacity of both models was weak. The analysis was performed using SPSS (version 21.0; IBM Corp, Armonk, NY, USA) and the “survival” and “rms” packages of R (GNU General Public License, version 3.5.1) (www.cran.r-project.org).