Main

Type 1 diabetes (T1D) is an autoimmune disease that leads to destruction of pancreatic β-cells and lifelong insulin deficiency1. It is thought to be multifactorial in origin, but its causes remain incompletely understood1. As T1D affects around 8.4 million individuals worldwide and its prevalence is expected to double in the next two decades2, it carries a considerable personal and societal burden, with adherence to a lifelong insulin requirement, a 10-year shortened life expectancy3 and a per-patient cumulative economic burden close to US$500,000 (ref. 4).

Evidence from large-scale population-based studies has consistently shown that substantial comorbidity exists between childhood-onset T1D and subsequent adult psychiatric disorders5,6,7. However, existing research has focused mostly on broadly defined psychiatric disorders and had only limited ambitions to ascertain whether the observed associations are best explained by the impacts of living with the condition and its treatment, or whether underlying common biological mechanisms may be implicated.

It is widely accepted that psychological and behavioral reactions may arise from the requirement for regular and frequent insulin injections, constant glucose monitoring, restrictions on diet and freedom of lifestyle, the prospect of short-term consequences of hypo- or hyperglycemia, and the long-term physical and potentially life-shortening complications of systemic diabetes manifestations. Children with T1D report higher levels of distress8,9, show more problem behaviors10 and report a lower quality of life than their peers11, and parents of children diagnosed with T1D report high levels of distress and family disruption12. Homo- or heterotypic continuity of childhood behavioral syndromes and the tracking of psychosocial putative causal factors into adult life might sufficiently explain the association between childhood T1D and adult psychiatric morbidity.

However, a biological link between childhood-onset T1D and psychiatric disorders is also possible. The brain undergoes dynamic changes during childhood and adolescence, requiring continuous glucose delivery for healthy development13. Childhood-onset T1D is longitudinally associated with persistent changes in global and regional brain volumes and cognition, partly explained by hypo- and hyperglycemic episodes14. Given that most psychiatric disorders peak in incidence by late adolescence15, unstable glycemic control during a critical neurodevelopmental period could predispose to wide-ranging consequences on psychiatric risk.

We aimed to address the limitations of existing research and take steps toward assessing potential causal pathways between childhood-onset T1D and psychiatric disorders using a two-step analytical approach designed to minimize bias and/or confounding. First, we used national register data from Czechia to investigate the association between T1D and subsequent psychiatric disorders. Then, we used independent bidirectional two-sample Mendelian randomization (MR) analyses of data from large-scale genome-wide association studies (GWAS) of European participants to further interrogate the associations.

Results

Observational analysis

Using data from the Czech nationwide register of all-cause hospitalizations, we identified 4,556 children with T1D aged ≤14 years between 1 January 1994 and 31 December 2007 (Supplementary Fig. 1). We subsequently matched each child with T1D with ten unique counterparts who had no T1D up to that point on sex, exact age, discharge year and discharge month (Supplementary Fig. 2). The mean age in both groups was 8.66 years (s.d. of 3.89 years), and the proportion of males was 52.81% (Table 1). Then, we used stratified Cox proportional hazards models to assess the risk of developing 6 psychiatric diagnostic groups and 21 specific or closely related psychiatric disorders during the follow-up period ranging from 10 to 24 years while also accounting for the competing risk of mortality (see also the proposed directed acyclic graph in Supplementary Fig. 3).

Table 1 Description of cohorts

Risk of subsequent psychiatric disorders

Individuals with childhood-onset T1D were more likely to develop substance use disorders (hazard ratio (HR) = 1.39; 95% confidence interval (CI) = 1.23–1.58), mood disorders (HR = 2.32; 95% CI = 1.82–2.96), anxiety disorders (HR = 1.61; 95% CI = 1.40–1.85), behavioral syndromes associated with physiological disturbances and physical factors (HR = 4.18; 95% CI = 3.24–5.39), and personality and behavioral disorders (HR = 1.39; 95% CI = 1.09–1.77) during the follow-up period than their matched counterparts without T1D. Conversely, individuals with childhood-onset T1D were less likely to develop psychotic disorders (HR = 0.55; 95% CI = 0.33–0.91).

Considering specific or closely related psychiatric disorders, individuals with childhood-onset T1D had an elevated risk of developing 12 out of the 21 of these during the follow-up period: alcohol use disorders (HR = 1.54; 95% CI = 1.32–1.80), drug use disorders (HR = 1.21; 95% CI = 1.02–1.44), depression (HR = 2.61; 95% CI = 2.02–3.38), other anxiety disorders (HR = 1.70; 95% CI = 1.27–2.27), reaction to severe stress, and adjustment disorders (HR = 1.76; 95% CI = 1.47–2.12), all other anxiety disorders (HR = 1.34; 95% CI = 1.07–1.69), eating disorders (HR = 3.47; 95% CI = 2.47–4.87), anorexia nervosa (HR = 2.55; 95% CI = 1.58–4.11), bulimia nervosa (HR = 6.19; 95% CI = 3.10–12.36), other eating disorders (HR = 5.51; 95% CI = 3.23–9.38), other behavioral syndromes (HR = 5.57; 95% CI = 3.82–8.13) and specific personality disorders (HR = 1.74; 95% CI = 1.30–2.34). Conversely, individuals with childhood-onset T1D were less likely to develop other psychotic disorders (HR = 0.53; 95% CI = 0.29–0.96). For the other outcomes, the 95% CIs were consistent with a null effect. See Fig. 1 for detailed results, Supplementary Figs. 430 for cumulative events plots and Supplementary Table 1 for the sex-stratified results.

Fig. 1: Risk of occurrence of psychiatric disorders in individuals with childhood-onset T1D.
figure 1

Incidence rates were calculated per 100,000 person-years. Incidence rate differences denote the difference between the incidence rate in individuals with T1D and their matched counterparts, and are expressed per 100,000 person-years. The associations between T1D and psychiatric disorders are expressed as adjusted HRs, accompanied by error bars expressed as 95% CIs.

Sensitivity analyses of observational data

We investigated the robustness of our findings by exploring the potential impact of different sources of bias and/or residual confounding on our estimates. The results of analysis of (1) children diagnosed with T1D up to 9 years of age and (2) incident T1D cases, assessing the potential impact of reverse causality and selection bias, respectively, did not diverge from the results of the main analysis for any of the outcomes.

When considering the number of previous hospitalizations to explore potential informative presence bias16, our results differed from the main analysis for personality disorders, for which the 95% CI covered a range from a decreased to an increased risk (HR = 1.28; 95% CI = 0.97–1.69). Further exploring potential informative presence bias, the results of comparison with children with asthma diverged from the main analysis for substance use disorders and personality disorders, with both of them being consistent with a null effect (HR = 1.13; 95% CI = 0.99–1.30 and HR = 1.05; 95% CI = 0.80–1.37). Detailed results are provided in Table 2, Supplementary Tables 25 and Supplementary Figs. 3134.

Table 2 Risk of occurrence of psychiatric disorders in individuals with childhood-onset T1D across sensitivity analyses

E values, indicating the strength of association that a potential confounder would need to have with both the exposure and the outcome to explain away the associations detected in the main models17, ranged from 1.71 for other non-alcohol substance use disorders to 11.86 for bulimia nervosa, with a median of 2.97 (Supplementary Table 6). When considering the effect of unmeasured confounders18, the weighted average of percent bias was below 10% for each outcome (Supplementary Table 7), indicating that the potential inclusion of unmeasured confounders would change our results by less than 10%.

MR analysis

To further explore the potential impact of residual confounding on associations that we identified in the observational analysis, we used univariable two-sample MR. MR is a genetic epidemiological method that uses summary data from GWAS to model genetic variants, fixed at conception, as instrumental variables to explore direction of association free of residual confounding. For T1D, we included several exposure instruments: a trans instrument featuring all genome-wide significant T1D variants and six cis instruments featuring single-nucleotide polymorphisms (SNPs) in gene regions associated with childhood-onset T1D19. Summary statistics for genetic variants were obtained from the most up-to-date and largest publicly available GWAS of European participants (Supplementary Table 8).

For schizophrenia, using our primary analysis method of inverse variance weighted (IVW) regression, we demonstrated that per one-unit increase in genetically predicted log odds of T1D as measured by the trans instrument, there was a 4% decrease in odds (odds ratio (OR) = 0.96; 95% CI = 0.93–0.99; P = 0.019). These results were consistent across secondary MR analysis methods, which can be more robust to potential bias-inducing pleiotropic effects of the genetic variants under different assumptions (weighted median OR = 0.96; 95% CI = 0.92–0.99; P = 0.032 and MR-Egger OR = 0.94; 95% CI = 0.89–0.99; P = 0.018), but none of these associations persisted following adjustment for multiple testing (adjusted P = 0.133, 0.096 and 0.072, respectively). We detected a similar inverse association when using the CTSH cis instrument and our primary IVW method (OR = 0.82; 95% CI = 0.68–0.99; P = 0.042), but it did not persist following adjustment for multiple testing (adjusted P = 0.252). In addition, we detected an opposing effect direction for the GLIS3 cis instrument using the secondary weighted median method (OR = 1.10; 95% CI = 1.03–1.19; P = 0.007; adjusted P = 0.028).

For anxiety disorders, per one-unit increase in genetically predicted log odds of T1D as measured by the GLIS3 cis instrument, there was a 46% increase in odds using our primary IVW method (OR = 1.46; 95% CI = 1.22–1.75; P < 0.001; adjusted P < 0.001). The results were consistent when using the secondary weighted median method (OR = 1.39; 95% CI = 1.11–1.74; P = 0.004; adjusted P = 0.016).

For anorexia nervosa, per one-unit increase in genetically predicted log odds of T1D as measured by the IL2RA cis instrument, there was a 12% decrease in odds using the secondary weighted median method only (OR = 0.88; 95% CI = 0.81–0.96; P = 0.003; adjusted P = 0.012).

For major depressive disorders, per one-unit increase in genetically predicted log odds of T1D as measured by the GLIS3 cis instrument was associated with a 7% increase in odds using the secondary weighted median method only (OR = 1.07; 95% CI = 1.00–1.15; P = 0.032), but this association did not persist following adjustment for multiple testing (adjusted P = 0.128).

For alcohol dependence, per one-unit increase in genetically predicted log odds of T1D as measured by the GLIS3 cis instrument, there was a 22% decrease in odds using the secondary weighted median method only (OR = 0.78; 95% CI = 0.65–0.78; P = 0.017); this association did not persist following adjustment for multiple testing (adjusted P = 0.068).

For all other analyses, we did not find any evidence for associations of genetically predicted T1D with psychiatric outcomes (Table 3, Supplementary Table 9 and Supplementary Figs. 3546). In bidirectional analysis, we did not find evidence for associations of genetically predicted psychiatric disorders with T1D, suggesting no evidence for reverse causality (Supplementary Table 10).

Table 3 Main MR results

MR sensitivity analyses

We conducted a range of sensitivity analyses to explore the robustness of our MR results. Tests of instrument strength indicated no strong evidence for weak instrument bias (Supplementary Tables 11 and 12). Cochran’s Q and MR-Egger intercept tests indicated no evidence for horizontal pleiotropy but some evidence of heterogeneity specifically for some analyses of schizophrenia, anxiety disorders and anorexia nervosa (Supplementary Table 13). MR-PRESSO indicated the presence of influential outliers for analyses of schizophrenia and anorexia nervosa for the trans instrument only. For schizophrenia, the results of outlier-corrected IVW did not materially change; however, evidence for anorexia nervosa strengthened (Supplementary Table 14). I2GX statistics (representing an adaptation of the I2 heterogeneity statistic from meta-analysis, related to the degree of dilution of the causal effect estimate) were all above 0.597 (Supplementary Table 15). Post hoc power analyses (Supplementary Table 16) suggested likely limitations in being able to detect particularly subtle potential causal effects for all psychiatric outcomes.

Discussion

We used independent observational and genetic epidemiological analyses to investigate the potential causal pathways underlying associations of childhood-onset T1D and subsequent psychiatric disorders. On the basis of Czech national register data, we found that individuals diagnosed with T1D in childhood have a lower risk of developing psychotic disorders but a higher risk of subsequently developing the majority of other studied psychiatric disorders compared with children without T1D. Results for mood and anxiety disorders and behavioral syndromes were robust to reverse causality, selection and informative presence bias, and quantitative bias analyses implied that the results were unlikely to be fully explained by confounding. The results of MR analysis were largely consistent in their support of a potential inverse causal relationship of T1D and psychotic disorders or schizophrenia, although evidence weakened following adjustment for multiple testing. There was at best only a limited consistency in MR evidence for all other studied psychiatric disorders.

Our observational findings are consistent with the results from two other national register studies. First, a Swedish study matched individuals diagnosed with T1D before 18 years of age on sex, year and country of birth with individuals with no recorded history of T1D, and found an increased risk for mood, anxiety, eating and substance use disorders after adjusting for a range of potential confounders5. Second, a Danish study matched children diagnosed with T1D before 18 years of age with counterparts without history of T1D on sex and date of birth, and found an elevated risk for mood, anxiety and eating disorders in both boys and girls6.

We did not find consistent MR evidence in support of a potential causal relationship between T1D and most of the included psychiatric disorders. It is recognized that rather than being a binary disorder, T1D most likely lies on a continuum, starting with the presence of islet antibodies, progressing to glucose intolerance or dysglycemia before the emergence of clinical symptoms20. The progression to symptomatic disease—one that would be captured in our observational analysis—shows substantial variability, ranging from months to decades20,21,22. Because of the relative rarity of T1D, our MR analysis based on data from psychiatric outcome GWAS contained most likely few individuals with symptomatic and therefore diagnosed T1D. Consequently, it is plausible that we captured the contributing polygenic biological mechanisms of T1D in individuals who do not have a symptomatic and therefore diagnosed T1D. Individuals who have genetic propensity for T1D but who do not progress to symptomatic disease are unlikely to face the psychosocial burden associated with being diagnosed and thus treated. If our interpretation is correct, then the discrepant findings between observational and genetic epidemiological analyses in this study may be explained by an indirect pathway between T1D and psychiatric morbidity, through living with the condition and its treatment, that we captured in the observational, but not in MR, analysis.

Children with T1D are indeed forced to make wholesale life adjustments with stringent, unrelenting focus on dietary monitoring and a high burden of daily management tasks23. Consequently, children with T1D may feel excluded from social events and singled out by peers, teachers and even family members24. ‘Diabetes distress’, including extreme frustration with blood sugars and feelings of isolation, can lead to burnout, hopelessness and a shift toward an external locus of control25. Furthermore, the implications of diabetes distress span into adolescence, since childhood-onset T1D may preclude achievement of developmental tasks pertinent to emerging adulthood26, leading to uncertainty surrounding identity and an increased risk of mental illness in adult life27. This underscores the critical importance of initiatives to proactively screen and monitor children diagnosed with T1D for emergent psychiatric disorders28.

Separately, we found more consistent evidence between observational and MR analyses for an inverse association between T1D and psychotic disorders or schizophrenia, although it was weakened following adjustment for multiple testing. This evidence, also consistent with results from a register-based study from Finland29, may herald some insights into schizophrenia pathogenesis and warrant specific investigation in future research. T1D is likely to be associated with instabilities in levels of both circulating insulin and glucose levels, particularly in the pre-diagnostic phases, where it is also associated with inflammation. Insulin receptors are widely expressed in the brain, with notable concentrations in regions of the brain known to be associated with schizophrenia30,31. Therefore, abnormal glucose–insulin signaling during a critical period of neurodevelopment, for example, in childhood and adolescence, may disrupt biological mechanisms that alter schizophrenia risk, in either a risk-decreasing or -increasing manner. For example, the direction of effect for the GLIS3 cis instrument switched, implying a positive association with schizophrenia. Previous work has shown that loci within the GLIS3 gene region have a shared effect on both T1D and type 2 diabetes risks via effects on pancreatic β-cell function, insulin sensitivity and inflammation32. Childhood fasting insulin levels have recently been shown to be longitudinally associated with psychosis risk in adulthood33, and previous MR evidence has shown the importance of inflammation as a potential common cause for schizophrenia and insulin resistance34.

This study has some limitations. First, our observational outcomes were measured using data from inpatient services; however, a large proportion of these will be diagnosed and managed in community settings. This would suggest that T1D may accentuate the severity of emergent psychiatric disorders, rather than cause them per se, and potentially contribute to limited generalizability of our findings to all healthcare settings. Second, the approaches to address potential sources of bias and/or confounding had their own limits. In particular, external adjustment for unmeasured confounders relied on information in existing literature; however, for multiple exposure–outcome pairs, information on only a limited number of confounders was available, contributing to differing levels of confidence that the detected associations are not due to unmeasured confounders. Third, the number of events for certain outcomes was very small, leading to considerable uncertainty in the estimates. Fourth, individuals with T1D were allowed to be used as matched counterparts of other people with T1D before they developed T1D. While such cases were exceedingly rare, this led to a partial overlap between the groups and potentially contributed to a marginal underestimation of true effects. Fifth, we had no information on emigration status, and we cannot rule out that a proportion of individuals was lost to follow-up. Sixth, we restricted our analyses to psychiatric conditions that occur, on average, later in life15 to increase the confidence in the temporal order of conditions; however, investigating the associations between T1D and earlier-onset neurodevelopmental disorders such as autism spectrum disorder and attention deficit hyperactivity disorder in future studies is warranted. Seventh, MR evidence weakened following adjustment for multiple testing; thus, these results should be considered as suggestive and accepted with some caution. Eighth, it is possible that our MR results may be imprecise owing to statistical power. Despite using the largest GWAS available for exposures and outcomes, our post hoc MR power calculations showed a possible limitation in being able to detect particularly subtle causal effects. From this interpretation, it would follow that childhood-onset T1D may not be a sufficient solitary cause for psychiatric disorders but may interact with other known risk factors to subtly alter psychiatric risk. In future, replication of our work when larger GWAS for T1D, in particular childhood-onset, and psychiatric outcomes are available will be required. Ninth, we were unable to interrogate some observational associations with MR owing to the unavailability of GWAS data for some psychiatric outcomes. Lastly, all GWAS included in MR analyses were based on European samples, which reduced the risk of population stratification bias, but may limit the generalizability of findings to other populations.

Conclusion

Through the combination of detailed observational and genetic epidemiological analyses, we provide insights into the wide-ranging and far-reaching psychiatric consequences of a T1D diagnosis in childhood. Our observational findings indicate higher risks of developing the majority of psychiatric disorders except psychoses in the proceeding decades after a childhood T1D diagnosis. However, we found a lack of consistent support for most studied psychiatric disorders in MR analysis, suggesting that these outcomes may be better explained by the psychological response to living with T1D and its treatment rather than by shared biological mechanisms. Separately, the inverse association between T1D and psychotic disorders or schizophrenia showed more consistency between observational and MR analyses, although MR evidence weakened following adjustment for multiple testing. Disentangling the potential mechanisms between T1D and schizophrenia warrants additional basic and experimental research efforts, but the results of this study clearly show that monitoring and addressing the mental health needs of children with T1D is imperative.

Methods

Observational analysis

Data

We used individual-level, de-identified data from Czech nationwide registers of (1) all-cause hospitalizations and (2) all-cause deaths, covering virtually the entire Czech population (approximately 10.7 million inhabitants). The Czech healthcare system is based on the compulsory insurance model, with the population coverage being virtually universal35. Beyond monitoring of public health, information from the registers is used to reimburse the service providers by insurance companies, thus increasing the confidence in their validity. Complete data between 1 January 1994 (the earliest available) and 31 December 2017 were used. This study was approved by the Ethics Committee of the National Institute of Mental Health (approval number 182/22). Owing to the legal mandate of the data, the analyses did not require informed consents from participants. See Supplementary Methods for further details.

Exposure

We included all hospitalizations between 1 January 1994 and 31 December 2007. We restricted the main analysis to individuals aged ≤14 years to limit the risk of reverse causality, because the incidence of examined psychiatric disorders before 14 years is thought to be modest36. The exposed cohort consisted of individuals with a recorded T1D diagnosis (International Classification of Diseases 10th Revision (ICD-10) code E10). We expected near-total detection of incident symptomatic T1D cases during the exposure window, since nearly all children with symptomatic T1D are initially hospitalized for treatment in Czechia37. The unexposed cohort consisted of (1) hospitalized individuals with no history of T1D during the examined time period and (2) the pre-T1D hospital records of individuals with T1D. Thus, an individual was allowed to be present both as an exposed individual and as an unexposed counterpart for another exposed individual. Exposed and unexposed individuals were included if they had no presence of a psychiatric disorder (F1–F6) listed at the index hospitalization. See Supplementary Methods for further details.

Outcome

Psychiatric disorders were assessed between the index hospitalization and 31 December 2017. Each individual was followed up between 10 and 24 years. We examined six ICD-10 psychiatric diagnostic groups (F1, F2, F3, F4, F5 and F6). We also examined 21 specific or closely related psychiatric disorders (F10, F11–F19, F11, F12, F13–F19, F20, F21–F29, F30–F31, F32–F33, F34–F39, F41, F410, F43, F40 or F42 or F44–F48, F50, F500–F501, F502–F503, F504–F509, F51–F59, F60 and F61–F69). See Supplementary Methods for further details.

Matching

We exact-matched each exposed individual with unexposed counterparts on age, sex, year and month at discharge from the exposed individuals’ index hospitalization. We randomly selected ten unique counterparts for each exposed individual. Sex and age at discharge from index hospitalization were considered important potential confounders; year and month at discharge ensured that the matched individuals would have a similar length of follow-up period and to control for possible cohort and calendar effects, respectively.

Statistical analysis

We provide baseline descriptive characteristics. We used stratified Cox proportional hazards models, with each stratum consisting of 11 individuals: 1 exposed and 10 matched unexposed counterparts. We considered the ‘event’ as the first recorded occurrence of a psychiatric disorder on a hospital record, examined separately for each included psychiatric disorder. We censored individuals who died or who did not experience the outcome during the follow-up period. Our observational analyses aimed to estimate the total potential causal effect of T1D diagnosis in childhood on the risk of subsequent psychiatric disorders. Results are expressed as HR with 95% CI, indicating the relative risk of developing psychiatric disorders in children with T1D compared with matched counterparts. Separate cumulative events plots were generated for each exposure–outcome pair. We used the R (4.0.3)38 libraries survival (3.2-7) and EValue (4.1.3)39 and avoided null-hypothesis significance tests40.

Sensitivity analyses of observational data

We performed several sets of sensitivity analyses to interrogate the robustness of our results under different scenarios, described in detail in Supplementary Methods. In brief, first, to further reduce the risk of including individuals who could have a psychiatric disorder before the index hospitalization (that is, reverse causality), we created cohorts with age at recorded T1D diagnosis restricted to 9 years or less.

Second, to account for the possibility that our main analysis contained prevalent cases that may have a higher disease severity, which, in turn, may increase the risk of experiencing the outcome, we restricted analysis to incident cases only. We did this by including only individuals for whom our data cover their entire lifespan.

Third, to account for the possibility that individuals with T1D might have more frequent healthcare interactions than their unexposed counterparts, which could lead to an increased chance of receiving a diagnosis of psychiatric disorder (informative presence bias16), we performed analysis after additionally matching children with T1D with up to 5 counterparts on the number of hospitalizations 3 years before the index hospitalization; we were not able to match 2 (0.05%) individuals. We also performed analysis comparing outcomes of children with T1D and children diagnosed with asthma (ICD-10 code J45), another lifelong chronic disease commonly diagnosed in childhood. We matched up to 3 children with asthma with each T1D exposed individual; we were unable to match 98 (2.15%) individuals.

Finally, we applied two analytical strategies to quantitively assess unmeasured confounding. First, we computed E values for each of our regression models where the 95% CI did not include a null effect, indicating the level of confounding that would be required to explain away the observed associations17. We considered the outcomes to be rare. Second, we performed external adjustment for unmeasured confounders to calculate how known but unmeasured confounders would influence the results18.

MR analysis

Selection of genetic variants for the exposures and outcomes

Where we identified evidence for observational associations, we performed univariable bidirectional MR analysis on GWAS of European participants, aiming to assess the total potential causal effect of T1D on subsequent psychiatric disorders. All GWAS adjusted for age, sex and population structure. Informed consent was sought per the original GWAS protocols. We used (1) all independent (10,000 kb pairs apart, r2 < 0.001) SNPs reported to be associated with T1D at the genome-wide level (P < 10−8) (trans instrument), and (2) six instruments featuring SNPs located in genes (GLIS3, CTSH, IKZF3, IL10, IL2RA and THEMIS) with potentially different T1D-inducing biological mechanisms that are particularly associated with childhood-onset T1D41 (cis instruments). The cis instruments were included to increase specificity to childhood-onset T1D, since genetically predicted T1D liability is distributed across all ages of T1D diagnosis19 (Supplementary Methods). Where SNPs were not available in the outcome datasets, we located proxy SNPs using linkage disequilibrium tagging (r2 > 0.8) via LDlink42. Approximated F-statistics43 (beta2/s.e.2) were calculated for each T1D genetic instrument used as a measure of instrument strength. For bidirectional analyses, we used complete summary data from the T1D GWAS as the outcome.

Statistical analysis

The trans instrument was clumped for linkage disequilibrium (that is, where more than one SNP with potentially different effects is tagged by an exposure SNP and can bias results) to ensure independence. For palindromic SNPs, the forward strand was inferred where possible using allele frequency information. Alleles were harmonized based on matching alleles. Where ≥2 SNPs were available for analysis, our primary analysis method was IVW regression, with correlation adjustment for cis instruments. Where <2 SNPs were available for analysis, we used the Wald ratio. Where ≥2 SNPs were available for analysis, we also conducted weighted median and MR-Egger regression as secondary analyses (Supplementary Methods). The results are expressed as OR with 95% CI, representing the change in odds of outcome per s.d. increase in genetically predicted T1D risk. Since our MR analysis can be considered as confirmatory, we included P values, including those adjusted for multiple testing, to explore the impact of potential type II statistical error on our results44. We used the Holm–Bonferroni method for P-value adjustment45.

MR sensitivity analyses

We performed several sensitivity analyses to estimate the robustness of our MR results. Power calculations46 estimated the minimum detectable causal effect, given the available GWAS sample sizes. SNP heterogeneity was estimated using Cochran’s Q test. Horizontal pleiotropy (where an exposure SNP influences the outcome by mechanisms other than through the exposure) was estimated using the MR-Egger regression intercept and the ‘MR pleiotropy residual sum and outlier’ (MR-PRESSO) method47 (Supplementary Methods). Using MR-PRESSO, we performed the global test to estimate for horizontal pleiotropy and, where evident, used the method to correct the IVW estimate via outlier removal. Variability between the beta-coefficients for genetic associations with the exposure in SNP–exposure associations, which can affect MR-Egger estimates, was estimated using the I2GX statistic48. We used the R (4.2.1)38 libraries TwoSampleMR (0.5.6)49, MendelianRandomization (0.6.0)50 and MRPRESSO (1.0)47.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.