Vitamin D3 for Life

Live Enlightened

Research libraryVitamin D3 For Life
Study design and methods

Primary relevance to vitamin D Vitamin D is a stated subject of this paper.

Vitamin D is a stated subject of this paper; the supporting source evidence is shown below.

Why this paper is included

Supporting source evidence:

Given the high prevalence of vitamin D deficiency (VDD) in T2DM and its potential effects on neuronal excitability, this study aimed to investigate the association between VDD and the long-term risk of incident epilepsy or seizure in adults with T2DM.

Source: Abstract. View original paper

Relevance classification does not establish study quality, causation or editorial approval.

Study design Cohort study.

Cohort study

Examines exposures and outcomes over time within a defined group.

Meta-analysis unclear · Blinding unclear / not reported · Human research reported

How this paper was classified

Automatic source-based classification; awaiting editorial verification. This is not a quality score.

Vitamin D deficiency and long-term risk of epilepsy or seizure in type 2 diabetes: a multicenter real-world cohort study

Source: Article title.

Eligible patients were required to have at least one healthcare encounter within 5 years before the index date to ensure adequate capture of baseline data.

Source: Methods.

View supporting evidence in the original paper

What the study types mean
Systematic review
Uses explicit methods to identify, assess and summarise research on a defined question.
Scoping review
Maps the extent and characteristics of research on a topic.
Narrative review
Discusses existing research; systematic-review methods have not been established by this classification.
Review / evidence synthesis
Reviews existing research; the exact review methods need further assessment.
Randomised controlled trial
Assigns participants or groups to comparison interventions by chance.
Non-randomised intervention study
Examines an intervention without random allocation.
Cohort study
Examines exposures and outcomes over time within a defined group.
Case-control study
Compares people with an outcome against people without it, examining exposures.
Cross-sectional study
Examines a population at a particular point in time.
Observational study
Observes exposures and outcomes without assigning the exposure; the subtype is not established here.
Case report
Describes an individual case.
Case series
Describes a group of individual cases.
Secondary analysis
Analyses existing study data; this paper is not automatically another independent trial.
Laboratory study
Investigates biological processes in a laboratory setting.
Qualitative study
Examines experiences or meanings using qualitative methods.
Genetic instrumental-variable study
Uses genetic variation as an instrument to investigate relationships; this is not a randomised treatment trial.
Study protocol
Describes planned methods and is not evidence that the planned study has reported results.
Multiple reported designs
More than one design is explicitly reported; examine the supporting methods.
Study design awaiting verification
The available source does not establish a sufficiently clear study design.

Meta-analysis combines numerical results from studies. Blinding describes who was unaware of treatment allocation. Neither is a separate quality grade. Study design, vitamin D relevance and document format are independent filters.

Full studies

Vitamin D deficiency and long-term risk of epilepsy or seizure in type 2 diabetes: a multicenter real-world cohort study

Cohort study · Frontiers in Nutrition · 2026

Original publication title

Vitamin D deficiency and long-term risk of epilepsy or seizure in type 2 diabetes: a multicenter real-world cohort study

Ming Yew; Ping-Hsin Liu; Ping-Hsun Feng

Copyright © 2026 Yew, Liu and Feng.

Original publication · Publisher record · CC BY 4.0

Source wording retained. Formatting, section navigation and display-title punctuation adapted for this research record.

Authors’ conclusion

Among adults with T2DM, clinically measured VDD was associated with a higher long-term risk of incident epilepsy or seizure. The strongest relative estimate was observed for intractable epilepsy, and risk estimates generally increased across progressively lower vitamin D categories. These findings suggest that VDD may serve as a clinically relevant risk marker in this population, but they do not establish a causal relationship or demonstrate that vitamin D supplementation can prevent epilepsy or seizure.

An extract from the source publication. Read it in context.

At a glance

Study background

What background does the paper provide?

Type 2 diabetes mellitus (T2DM) is one of the most prevalent chronic diseases worldwide and is accompanied by a wide range of neurological and metabolic complications (1Not reported4). Patients with T2DM have an elevated burden of seizures and epilepsy, attributable in part to recurrent hypoglycemia, cerebral microvascular disease, cerebrovascular events, autonomic and metabolic dysregulation, and chronic neuroinflammation (5Not reported10). These risk factors may coexist and accumulate over time, making seizure-related outcomes an important but relatively under-recognized neurological complication in this population (8, 11, 12).

Therefore, identifying the factors associated with this elevated risk is of clinical interest.

Vitamin D deficiency (VDD) is highly prevalent among patients with T2DM and may reflect a combination of inadequate sunlight exposure, adiposity, chronic inflammation, renal dysfunction, and altered metabolic health (13Not reported15). Beyond its classical role in bone and mineral metabolism, vitamin D exerts neuromodulatory effects by regulating intracellular calcium homeostasis, neurotrophin expression, and anti-inflammatory and antioxidant pathways, which are biologically relevant to neuronal excitability and seizure susceptibility (16, 17). These observations raise the possibility that low vitamin D status may be associated with a higher risk of epilepsy, particularly in T2DM, in which VDD is common and seizure risk is already elevated.

However, existing evidence is limited and largely indirect. Most clinical studies have examined the reverse relationship, reporting a high prevalence of VDD among patients already diagnosed with epilepsy, partly related to long-term use of antiseizure medications (18Not reported20). Mendelian randomization studies evaluating genetically predicted 25(OH)D levels and epilepsy risk have reported inconsistent or largely null findings (21Not reported23). However, such studies (21Not reported23) did not directly determine whether clinically measured VDD precedes incident epilepsy or seizure in real-world patients.

Few longitudinal cohort studies have examined this temporal relationship, and none have specifically focused on patients with T2DM, in whom both VDD and seizure-related risk factors are common.

To address this gap, we conducted a large, multinational, propensity score: matched cohort study using real-world data to examine the association between VDD and the long-term risk of incident epilepsy and seizure in adults with T2DM. We further assessed epilepsy subtypes, antiepileptic drug use, mortality, and possible exposure-gradient relationships to characterize the robustness and consistency of this association.

Source: Introduction Source: Introduction Source: Introduction Source: Introduction

Study methods

What methods does the paper describe?

2.1

Study design and data source

We conducted a retrospective, propensity score: matched cohort study using the TriNetX Global Collaborative Network, a federated platform aggregating de-identified electronic health records from more than 150 healthcare organizations across multiple regions. The TriNetX platform has been extensively used in peer-reviewed studies across a broad range of clinical disciplines (24Not reported27). Because only aggregated, de-identified data were analyzed, the requirement for individual informed consent was waived. The study was approved by the Institutional Review Board of Chi Mei Medical Center and conducted in accordance with the Declaration of Helsinki.

2.2

Exposure classification

We identified adults aged ≥18 years with type 2 diabetes mellitus (T2DM) who had a recorded serum or plasma 25-hydroxyvitamin D [25(OH)D] measurement between January 1, 2013, and December 31, 2023. T2DM was defined using the ICD-10-CM code E11. Vitamin D status was based on the first qualifying 25(OH)D measurement during the study period. VDD was defined as a serum or plasma 25(OH)D level <20 ng/mL, whereas the control cohort comprised patients with levels ≥30 ng/mL. Laboratory data within the network are harmonized to common clinical concepts and measurement units.

However, information regarding assay manufacturers, analytical platforms, calibration procedures, and local quality-control practices was unavailable; therefore, we could not confirm that 25(OH)D assays were analytically standardized across participating healthcare organizations. The index date was defined as the date of the first qualifying vitamin D measurement that met the exposure definition. Eligible patients were required to have at least one healthcare encounter within 5 years before the index date to ensure adequate capture of baseline data. A 5-year look-back was further applied to confirm persistent rather than transient vitamin D status: patients with VDD who had any prior measurement ≥20 ng/mL and controls who had any prior measurement <30 ng/mL were excluded from the study.

2.3

Exclusion criteria and landmark analysis

Patients were excluded if they had a diagnosis of epilepsy or recurrent seizures (ICD-10-CM G40) or any recorded antiepileptic medication use before or during the 1-year period after the index date to reduce the likelihood of including patients with pre-existing epileptic disorders or early events temporally unrelated to vitamin D status. Patients who died within 1 year after the index date were also excluded, consistent with the 1-year landmark design used to reduce early reverse causation and survivorship bias in the study.

Additional exclusions were applied to reduce confounding by conditions that may substantially affect vitamin D metabolism, nutritional status, seizure risk, or outcome ascertainment. Patients were excluded if they had end-stage renal disease, stage 4 or 5 chronic kidney disease, dependence on renal dialysis, human immunodeficiency virus infection, liver fibrosis or cirrhosis, celiac disease, Crohn’s disease, short bowel syndrome, or pancreatic diseases before the index date. Patients with acute perturbations within 1 month before the index date (pregnancy, recent critical care, acute kidney failure, and sepsis), which can transiently depress 25(OH)D levels, were also excluded.

We additionally excluded patients with major neurological conditions that independently predispose them to seizures, including intracranial injury, CNS neoplasms, encephalitis or myelitis, anoxic brain injury, cerebral palsy, dementia, and Alzheimer’s disease. The diagnostic codes used to define the exclusion criteria are summarized in Supplementary Table 1.

2.4

Propensity score matching

Patients in the VDD and control cohorts were matched 1:1 using greedy nearest-neighbor matching with a caliper width equal to 0.1 times the pooled standard deviation of the logit of the propensity score. Propensity scores were estimated using a logistic model incorporating demographics, comorbidities, medications, healthcare utilization, and laboratory values. We specifically included factors known to independently influence seizure risk in diabetes, including diabetes-related complications and prior hypoglycemia, because both can provoke seizures irrespective of vitamin D levels and would confound the association.

Missing laboratory values were not imputed. Covariate balance was evaluated using standardized mean differences, with a value <0.10 indicating an acceptable balance. The codes used for all the matching variables are detailed in Supplementary Table 2.

2.5

Study outcomes

The primary outcome was incident epilepsy or seizure, defined using ICD-10-CM code G40, during an analytic window extending up to 12 years after the index date. Secondary outcomes assessed over the same period included epilepsy subtypes (focal, generalized, and intractable epilepsy), antiepileptic medication use, and mortality. Follow-up began after the completion of the 1-year landmark period and continued until the first occurrence of the outcome of interest, death, loss to follow-up, or the end of the study window, whichever occurred first.

Two control outcomes were prespecified: secondary hyperparathyroidism, a biologically plausible positive control related to VDD, and acute appendicitis, a negative control with no expected association with the vitamin D status. These outcomes were used to contextualize the specificity of the observed associations and assess potential residual confounding or surveillance-related artifacts. Subsequent low 25(OH)D levels during follow-up were evaluated to assess exposure durability, and the occurrence of at least one follow-up healthcare encounter was compared between groups to examine potential surveillance bias.

The diagnostic codes for all outcomes are provided in Supplementary Table 3.

2.6

Sensitivity, subgroup, and multivariable analyses

Robustness was assessed using four sensitivity models, each addressing a distinct potential source of bias. Model I was restricted to patients who survived the follow-up period to evaluate whether the association persisted independent of differential mortality between groups. Model II was restricted to patients with at least one recorded follow-up encounter, ensuring comparable opportunities for outcome ascertainment and reducing potential detection bias. Model III excluded patients with prior hypoglycemia because hypoglycemia is a recognized seizure precipitant that may confound the association independently of vitamin D status.

Model IV excluded patients whose vitamin D status crossed the pre-specified exposure threshold during follow-up, thereby reducing time-varying exposure misclassification.

Prespecified subgroup analyses were conducted by age (18 to 65 and >65 years) and sex, with interaction terms used to assess potential effect modification. As a complementary analysis independent of propensity score matching, we fitted a multivariable Cox proportional hazards model in the full unmatched cohort, adjusting for sex, age, race, hypertension, dyslipidemia, overweight/obesity, chronic kidney disease, ischemic heart disease, nicotine dependence, cerebrovascular disease, alcohol-related disorders, hypoglycemia, glycemic control, and liver disease.

2.7

Exposure-gradient analysis

To explore the exposure-gradient relationship beyond the primary VDD analysis, we performed additional matched comparisons for severe VDD (<10 ng/mL) and vitamin D insufficiency (20 to 29.9 ng/mL), each against normal vitamin D status (≥30 ng/mL), using the same propensity score matching strategy and outcome definitions as in the primary analysis. Progressively higher risk estimates across vitamin D insufficiency, VDD, and severe VDD were considered consistent with an exposure-gradient pattern. A formal trend test was not performed because this function was not available within the TriNetX analytic platform.

2.8

Statistical methods

The primary analysis used a cause-specific Cox proportional hazards framework. Hazard ratios (HRs) with 95% confidence intervals (CIs) were estimated, and survival was compared using Kaplan: Meier curves with the log-rank test. The proportional hazards assumption was evaluated using Schoenfeld residuals. E-values were computed for the primary outcome to assess the sensitivity to potential unmeasured confounding. Analyses were performed using the TriNetX Analytics platform. Statistical significance for the primary endpoint was defined using a two-sided α level of 0.05. All secondary, control, sensitivity, subgroup, and exposure-gradient analyses were treated as exploratory, with no adjustment for multiple comparisons.

Source: Materials and methods Source: Materials and methods Source: Materials and methods Source: Materials and methods Source: Materials and methods Source: Materials and methods Source: Materials and methods Source: Materials and methods

Patient selection and baseline characteristics

Results: Patient selection and baseline characteristics

Prior to matching, 166,173 patients with VDD and 259,188 controls with normal vitamin D levels were eligible. Before matching, the proportions of missing laboratory values in the VDD and control cohorts were 18.0% and 22.5% for glucose, 26.6% and 32.6% for hemoglobin, 29.4% and 32.1% for albumin, and 34.6% and 38.2% for HbA1c, respectively. The two cohorts were imbalanced across several baseline characteristics (Table 1). The VDD group was younger (mean age, 56.0 vs. 65.0 years; SMD, 0.584), had a lower proportion of White patients (51.8% vs. 70.3%), and had a higher proportion of Black patients (25.5% vs. 12.9%).

The groups also differed in the prevalence of disorders of lipoprotein metabolism, overweight or obesity, hypertension, neoplasms, and nicotine dependence (all SMD > 0.10). After 1:1 propensity score matching, 135,329 patients remained in each group. The baseline characteristics were well balanced between the groups, with all standardized mean differences <0.10. The mean age was similar between the VDD and control groups (59.7 vs. 59.8 years), as were the proportions of women (59.4% vs. 59.8%) and White patients (59.2% vs. 59.1%).

TABLE 1

Baseline characteristics of patients with vitamin D deficiency and normal vitamin D status before and after propensity score matching.

VariablesBefore matchingAfter matching
VDD group
(n = 166,173)
Control group
(n = 259,188)
SMDVDD group
(n = 135,329)
Control group
(n = 135,329)
SMD
Patient characteristics
Age at index (years)56.0 ± 16.765.0 ± 13.90.58459.7 ± 14.859.8 ± 14.80.004
Female97617 (58.7)161495 (62.3)0.07380416 (59.4)80957 (59.8)0.008
BMI > 30 kg/m242936 (25.8)90652 (35.0)0.20037800 (27.9)38197 (28.2)0.007
White86105 (51.8)182239 (70.3)0.38680112 (59.2)79952 (59.1)0.002
Black or African American42388 (25.5)33363 (12.9)0.32526656 (19.7)27043 (20.0)0.007
Asian6937 (4.2)14313 (5.5)0.0636347 (4.7)5984 (4.4)0.013
Comorbidities and health services
Factors influencing health status and contact with health services124569 (75.0)197772 (76.3)0.031101317 (74.9)101616 (75.1)0.005
Essential (primary) hypertension95435 (57.4)166032 (64.1)0.13681224 (60.0)81677 (60.4)0.007
Disorders of lipoprotein metabolism and other lipidemias85461 (51.4)165745 (63.9)0.25575942 (56.1)76319 (56.4)0.006
Overweight and obesity61944 (37.3)70839 (27.3)0.21445001 (33.3)45188 (33.4)0.003
Neoplasms36325 (21.9)71989 (27.8)0.13732323 (23.9)32092 (23.7)0.004
Ischemic heart diseases22680 (13.6)43041 (16.6)0.08320234 (15.0)19989 (14.8)0.005
Obstructive sleep apnea20577 (12.4)30206 (11.7)0.02216533 (12.2)16307 (12.1)0.005
Anemias18708 (11.3)30214 (11.7)0.01315143 (11.2)15169 (11.2)0.001
Chronic kidney disease16425 (9.9)33688 (13.0)0.09814611 (10.8)14493 (10.7)0.003
Nicotine dependence19359 (11.7)17966 (6.9)0.16313180 (9.7)13400 (9.9)0.005
Diseases of liver13699 (8.2)19662 (7.6)0.02411055 (8.2)10844 (8.0)0.006
COPD10551 (6.3)16189 (6.2)0.0048935 (6.6)8946 (6.6)0.000
Cerebrovascular diseases10054 (6.1)18872 (7.3)0.0498895 (6.6)8831 (6.5)0.002
T2DM with kidney complications9570 (5.8)18304 (7.1)0.0538373 (6.2)8229 (6.1)0.004
T2DM with neurological complications8367 (5.0)13763 (5.3)0.0127096 (5.2)6916 (5.1)0.006
COVID-196752 (4.1)10602 (4.1)0.0015404 (4.0)5405 (4.0)0.000
T2DM with ophthalmic complications6006 (3.6)8670 (3.3)0.0154908 (3.6)4887 (3.6)0.001
Alcohol related disorders4361 (2.6)3845 (1.5)0.0812874 (2.1)2820 (2.1)0.003
T2DM with hypoglycemia2460 (1.5)3327 (1.3)0.0171928 (1.4)1851 (1.4)0.005
Malnutrition1946 (1.2)2695 (1.0)0.0131537 (1.1)1493 (1.1)0.003
Medications
Metformin52531 (31.6)79368 (30.6)0.02142115 (31.1)41903 (31.0)0.003
Insulins and analogues40334 (24.3)49981 (19.3)0.12130445 (22.5)30314 (22.4)0.002
Vitamin D32296 (19.4)47926 (18.5)0.02425091 (18.5)25086 (18.5)0.000
GLP-1 analogues10524 (6.3)18447 (7.1)0.0318964 (6.6)8829 (6.5)0.004
SGLT2 inhibitors7491 (4.5)15062 (5.8)0.0596738 (5.0)6670 (4.9)0.002
Laboratory data
Glucose < 70 mg/dL10913 (6.6)13102 (5.1)0.0658192 (6.1)8185 (6.0)0.000
Hemoglobin > 12 g/dL110054 (66.2)160298 (61.8)0.09188358 (65.3)88757 (65.6)0.006
Albumin > 3.5 g/dL111653 (67.2)171529 (66.2)0.02190519 (66.9)90780 (67.1)0.004

Data are presented as number (%) or mean ± standard deviation. Vitamin D deficiency was defined as serum 25-hydroxyvitamin D < 20 ng/mL, and normal vitamin D status was defined as serum 25-hydroxyvitamin D ≥ 30 ng/mL. Standardized mean differences <0.10 were considered acceptable for covariate balance. COPD, chronic obstructive pulmonary disease; GLP-1, glucagon-like peptide-1; SGLT2, sodium-glucose cotransporter 2; SMD, standardized mean difference; T2DM, type 2 diabetes mellitus; VDD, vitamin D deficiency.

Source: Patient selection and baseline characteristics Source: Patient selection and baseline characteristics

Results: Primary and secondary outcomes

The mean follow-up durations were 5.0 years in the VDD group and 4.9 years in the control group, and the corresponding median durations were 4.5 and 4.3 years. VDD was associated with a higher risk of incident epilepsy or seizure than normal vitamin D status (1,486 [1.10%] vs. 1,050 [0.78%]; HR, 1.37; 95% CI, 1.26 to 1.48; p < 0.001) (Table 2). The proportional hazards assumption was not violated for the primary outcome based on the Schoenfeld residual test (p = 0.951).

Although the relative association was statistically significant, the absolute incidence difference was small (0.32 percentage points). The primary outcome E-value was 2.08 for the point estimate and 1.83 for the lower 95% confidence interval bound, meaning that an unmeasured confounder would need to be associated with both VDD and incident epilepsy or seizure by risk ratios of at least 2.08 each, beyond the measured covariates, to fully explain the observed association. Although the absolute incidence was low in both groups, similar associations were observed for focal epilepsy (HR, 1.40; p < 0.001), generalized epilepsy (HR, 1.42; p = 0.003), and intractable epilepsy (HR, 1.92; p < 0.001), with the largest relative estimate observed in intractable epilepsy.

VDD was also associated with greater antiepileptic medication use (HR, 1.25; p < 0.001) and higher all-cause mortality (9.43% vs. 6.18%; HR, 1.47; p < 0.001).

TABLE 2

Association between vitamin D deficiency and risks of epilepsy-related outcomes and mortality in patients with type 2 diabetes.

OutcomeVDD group
(n = 135,329)
Control group
(n = 135,329)
HR (95% CI)P-valueAbsolute risk difference (percentage points)
Events (%)Events (%)
Primary outcome
Epilepsy or seizure1,486 (1.10)1,050 (0.78)1.37 (1.26 to 1.48)<0.0010.32
Secondary outcomes
Focal epilepsy353 (0.26)243 (0.18)1.40 (1.19 to 1.65)<0.0010.08
Generalized epilepsy175 (0.13)118 (0.09)1.42 (1.13 to 1.80)0.0030.04
Intractable epilepsy87 (0.06)43 (0.03)1.92 (1.33 to 2.76)<0.0010.03
Antiepileptics25,138 (18.58)20,294 (15.00)1.25 (1.23 to 1.27)<0.0013.58
Mortality12,766 (9.43)8,366 (6.18)1.47 (1.43 to 1.51)<0.0013.25

Data are presented as number of events (%). Absolute risk difference was calculated as the event percentage in the VDD group minus that in the control group and is expressed in percentage points. CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency.

Source: Primary and secondary outcomes Source: Primary and secondary outcomes

Results: Control and supportive outcomes

The prespecified control outcomes showed an expected pattern. The positive control, secondary hyperparathyroidism, was more frequent in the VDD group (HR, 1.50; p < 0.001), whereas the negative control, acute appendicitis, was not significantly associated with VDD (HR, 1.08; p = 0.298) (Table 3). Follow-up healthcare encounters were slightly less frequent in the VDD group (HR, 0.92; p < 0.001), suggesting that greater surveillance among exposed patients was unlikely to fully explain the observed associations. Subsequent low 25(OH)D levels during follow-up were substantially more common in the VDD group (HR, 3.62; p < 0.001), supporting the durability of the baseline exposure classification.

TABLE 3

Control and supportive outcome analyses after propensity score matching.

OutcomeVDD group (n = 135,329)Control group (n = 135,329)HR (95% CI)P-value
Events (%)Events (%)
Secondary hyperparathyroidism483 (0.36)314 (0.23)1.50 (1.30 to 1.73)<0.001
Acute appendicitis378 (0.28)336 (0.25)1.08 (0.93 to 1.25)0.298
Any follow-up healthcare encounter123,887 (91.55)126,370 (93.38)0.92 (0.91 to 0.93)<0.001
Subsequent VDD during follow-up19,578 (14.47)5,754 (4.25)3.62 (3.51 to 3.73)<0.001

Data are presented as number of events (%). Secondary hyperparathyroidism was used as a positive control outcome, whereas acute appendicitis was used as a negative control outcome. Follow-up healthcare encounters were assessed to examine potential surveillance bias, and subsequent VDD during follow-up was assessed to evaluate exposure durability. CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency.

Source: Control and supportive outcomes Source: Control and supportive outcomes

Results: Sensitivity and subgroup analyses

The primary association remained stable across all four sensitivity models, with HRs ranging from 1.29 to 1.42 (all p < 0.001). The association with mortality also persisted in models in which mortality could be assessed, except for Model I, in which mortality was not applicable because the analysis was restricted to patients who survived throughout the follow-up. Intractable epilepsy consistently showed the largest relative estimates across the sensitivity models (HR range, 1.62 to 1.76) (Table 4).

TABLE 4

Sensitivity analyses for the association between vitamin D deficiency and risks of epilepsy-related outcomes.

OutcomesModel IModel IIModel IIIModel IV
HR (95% CI)P-valueHR (95% CI)P-valueHR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.29 (1.17 to 1.41)<0.0011.35 (1.25 to 1.46)<0.0011.32 (1.22 to 1.43)<0.0011.42 (1.28 to 1.58)<0.001
Focal epilepsy1.24 (1.02 to 1.50)0.0271.38 (1.17 to 1.62)<0.0011.38 (1.17 to 1.63)<0.0011.50 (1.21 to 1.86)<0.001
Generalized epilepsy1.40 (1.05 to 1.85)0.0201.40 (1.10 to 1.78)0.0061.30 (1.03 to 1.65)0.0251.57 (1.15 to 2.15)0.004
Intractable epilepsy1.68 (1.11 to 2.55)0.0131.75 (1.22 to 2.51)0.0021.62 (1.13 to 2.32)0.0081.76 (1.13 to 2.74)0.011
Antiepileptics1.24 (1.21 to 1.26)<0.0011.25 (1.22 to 1.27)<0.0011.23 (1.21 to 1.25)<0.0011.18 (1.15 to 1.21)<0.001
MortalityNANA1.48 (1.44 to 1.52)<0.0011.48 (1.44 to 1.53)<0.0011.80 (1.74 to 1.87)<0.001

Model I was restricted to patients who survived throughout follow-up. Model II was restricted to patients with at least one recorded healthcare encounter during follow-up. Model III excluded patients with a previous history of hypoglycemia. Model IV excluded patients whose vitamin D status crossed the prespecified exposure threshold during follow-up, defined as 25-hydroxyvitamin D ≥ 20 ng/mL in the VDD group or <30 ng/mL in the control group. CI, confidence interval; HR, hazard ratio; NA, not applicable; VDD, vitamin D deficiency.

In age-stratified analyses, the association with the primary outcome was stronger among patients older than 65 years (HR, 1.44, p < 0.001) than among those aged 18 to 65 years (HR, 1.15, p = 0.039), with a significant interaction (p for interaction = 0.006) (Table 5). Significant interactions were also observed for focal epilepsy and antiepileptic drug use (p for interaction = 0.026 and <0.001, respectively), with stronger estimates in the older stratum. In sex-stratified analyses (Table 6), the estimate for the primary outcome was numerically higher in women (HR, 1.49, p < 0.001) than in men (HR, 1.20, p = 0.004), although the interaction for the primary outcome did not reach statistical significance (p for interaction = 0.084).

Significant interactions were observed for focal epilepsy and antiepileptic medication use (p for interaction = 0.006 for both), with stronger estimates in women.

TABLE 5

Age-stratified subgroup analyses for the association between vitamin D deficiency and risks of epilepsy-related outcomes.

Outcomes18 to 65 years>65 yearsp for
(n = 59,286 for each group)(n = 75,041 for each group)interaction
HR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.15 (1.01 to 1.31)0.0391.44 (1.31 to 1.59)<0.0010.006
Focal epilepsy1.05 (0.79 to 1.39)0.7601.54 (1.26 to 1.88)<0.0010.026
Generalized epilepsy1.08 (0.72 to 1.63)0.6951.57 (1.17 to 2.10)0.0030.140
Intractable epilepsy1.75 (1.02 to 3.02)0.0402.05 (1.26 to 3.32)0.0030.682
Antiepileptics1.18 (1.15 to 1.22)<0.0011.28 (1.25 to 1.31)<0.001<0.001
Mortality1.45 (1.34 to 1.57)<0.0011.46 (1.42 to 1.50)<0.0010.872

CI, confidence interval; HR, hazard ratio.

TABLE 6

Sex-stratified subgroup analyses for the association between vitamin D deficiency and risks of epilepsy-related outcomes.

OutcomesMaleFemaleP for interaction
(n = 54,116 for each group)(n = 80,855 for each group)
HR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.20 (1.06 to 1.37)0.0041.49 (1.34 to 1.64)<0.0010.084
Focal epilepsy1.06 (0.83 to 1.37)0.6321.71 (1.37 to 2.12)<0.0010.006
Generalized epilepsy1.25 (0.85 to 1.85)0.2571.44 (1.07 to 1.95)0.0170.576
Intractable epilepsy1.49 (0.76 to 2.91)0.2421.99 (1.29 to 3.05)0.0010.481
Antiepileptics1.20 (1.16 to 1.24)<0.0011.27 (1.24 to 1.30)<0.0010.006
Mortality1.42 (1.37 to 1.48)<0.0011.48 (1.43 to 1.54)<0.0010.131

CI, confidence interval; HR, hazard ratio.

Source: Sensitivity and subgroup analyses Source: Sensitivity and subgroup analyses Source: Sensitivity and subgroup analyses Source: Sensitivity and subgroup analyses Source: Sensitivity and subgroup analyses

Results: Multivariable cox regression

Within the entire unmatched cohort (Table 7), the link between VDD and incident epilepsy or seizure persisted even after adjusting for demographic and clinical covariates concurrently (HR, 1.41, p < 0.001). The strongest covariate associations were cerebrovascular disease (2.61, p < 0.001) and alcohol-related disorders (HR, 2.26, p < 0.001), followed by a recorded glucose level <70 mg/dL (HR, 1.93, p < 0.001), chronic kidney disease (HR, 1.37, p < 0.001), nicotine dependence (HR, 1.31, p < 0.001), hemoglobin A1c ≥ 9% (HR, 1.16, p = 0.003), and ischemic heart disease (HR, 1.14, p = 0.008).

In contrast, disorders of lipoprotein metabolism (HR, 0.76, p < 0.001) and overweight or obesity (HR, 0.88, p = 0.002) were inversely associated with the outcome.

TABLE 7

Multivariable Cox regression model for incident epilepsy or seizure in the unmatched cohort.

VariableHR (95% CI)P-value
VDD vs. control group1.41 (1.31 to 1.51)<0.001
Male0.95 (0.88 to 1.02)0.145
Age at index1.01 (1.01 to 1.01)<0.001
White1.02 (0.95 to 1.10)0.594
Essential hypertension0.99 (0.91 to 1.08)0.788
Disorders of lipoprotein metabolism and other lipidemias0.76 (0.70 to 0.82)<0.001
Overweight and obesity0.88 (0.81 to 0.95)0.002
Chronic kidney disease1.37 (1.24 to 1.51)<0.001
Ischemic heart diseases1.14 (1.04 to 1.25)0.008
Nicotine dependence1.31 (1.18 to 1.47)<0.001
Cerebrovascular diseases2.61 (2.36 to 2.88)<0.001
Alcohol-related disorders2.26 (1.91 to 2.67)<0.001
Type 2 diabetes mellitus with hypoglycemia1.16 (0.90 to 1.48)0.258
Glucose < 70 mg/dL1.93 (1.73 to 2.14)<0.001
Hemoglobin A1c ≥ 9%1.16 (1.05 to 1.28)0.003
Diseases of liver1.07 (0.95 to 1.22)0.275

CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency.

Source: Multivariable cox regression Source: Multivariable cox regression

Discussion

In this large multinational propensity score: matched cohort of adults with T2DM, VDD was associated with a higher long-term risk of incident epilepsy or seizure. The association was observed across epilepsy subtypes and was most pronounced for intractable epilepsy, a clinically severe phenotype. The primary association remained robust across sensitivity analyses addressing differential mortality, follow-up ascertainment, prior hypoglycemia, and time-varying vitamin D status. Most epilepsy-related outcomes also showed progressively higher risk estimates across lower vitamin D categories. The prespecified positive and negative control outcomes behaved as expected.

In addition, the primary association remained consistent in the sensitivity analysis restricted to patients with at least one recorded follow-up encounter. However, despite the statistically significant relative association, the absolute incidence difference was small (1.10% vs. 0.78%; absolute difference, 0.32 percentage points). Accordingly, the clinical relevance of this finding should be interpreted cautiously, and VDD should be regarded primarily as a potential risk marker rather than an indicator of a large absolute increase in seizure risk.

These findings extend the prior literature, which has primarily focused on the reverse direction of association between epilepsy and vitamin D status. Previous studies have frequently reported a high prevalence of VDD among patients with established epilepsy, often attributed to long-term antiseizure medication use, reduced mobility, and limited sunlight exposure (18Not reported20). However, these cross-sectional or treatment-focused studies cannot establish whether low vitamin D status temporally precedes the development of incident epilepsy or seizure. By excluding patients with pre-existing epilepsy or antiseizure medication use and applying a 1-year landmark design, the present study specifically evaluated the temporal relationship between antecedent VDD and subsequent incident epilepsy or seizure in adults with T2DM, a population in which both VDD and seizure-related risk factors are common.

The multivariable Cox analysis supported the internal coherence of the findings by reproducing associations with established seizure-related risk factors. Consistent with the established epidemiology of seizure-related outcomes in diabetes and older adults, cerebrovascular disease, recorded glucose <70 mg/dL, and older age were independently associated with incident epilepsy or seizure (5, 12, 28). These findings are clinically plausible because cerebrovascular injury and hypoglycemia are well-recognized seizure precipitants, particularly in patients with metabolic vulnerability. Interestingly, disorders of lipoprotein metabolism and being overweight or obese were inversely associated with incident epilepsy or seizure in our unmatched multivariable model.

A similar pattern has been reported previously; in a study of older veterans, Pugh et al. (28) similarly reported that hypercholesterolemia and obesity were associated with a lower likelihood of new-onset epilepsy, whereas cerebrovascular disease was strongly associated with an increased risk. Therefore, the inverse associations observed in our study should be interpreted cautiously rather than as evidence of a protective biological effect. Potential explanations include residual confounding, differences in treatment patterns such as statin use, healthcare behavior, diagnostic coding, survival or competing risk mechanisms, and collider bias.

Overall, the multivariable findings support the coherence of the VDD: epilepsy association with recognized seizure-related risk factors while also highlighting the complexity of interpreting metabolic covariates in observational EHR-based research.

Several hypothesized mechanisms may provide biological plausibility for the observed association, as vitamin D signaling has been implicated in neuronal calcium regulation, neurotrophin expression, oxidative stress, and inflammatory pathways that may be relevant to neuronal excitability (29Not reported31). In patients with T2DM, these mechanisms could interact with pre-existing metabolic, vascular, and inflammatory vulnerability; however, these pathways were not directly evaluated in the present study and remain speculative. The exposure-gradient findings provided additional supportive evidence but should be interpreted as exploratory because no formal trend test was performed.

Most epilepsy-related outcomes, including the primary outcome, focal epilepsy, intractable epilepsy, and antiepileptic medication use, showed progressively higher estimates from vitamin D insufficiency to VDD and severe VDD. However, this pattern was not fully consistent for generalized epilepsy, and the analysis should be interpreted with caution. Because the TriNetX platform does not support patient-level continuous exposure modeling or formal trend testing, we could not perform a continuous dose-response analysis or formally test linearity or nonlinearity. Therefore, the observed pattern should be regarded strictly as hypothesis-generating and should not be interpreted as evidence of a statistically confirmed dose-response relationship.

The apparent discrepancy between our findings and those of Mendelian randomization studies warrants careful interpretation. Genetic studies have generally reported null or inconsistent associations between genetically predicted 25(OH)D levels and epilepsy risk (21Not reported23), suggesting that the direct lifelong causal effect of vitamin D on epilepsy may be limited or difficult to detect. However, Mendelian randomization and real-world cohort studies address different research questions. Genetically predicted 25(OH)D in Mendelian randomization studies represents lifelong genetic liability to circulating 25(OH)D levels, whereas clinically measured VDD may reflect an acquired and dynamic risk state influenced by sunlight exposure, nutrition, adiposity, inflammation, renal dysfunction, metabolic control, and comorbidity burden.

Therefore, null or inconsistent genetic evidence does not necessarily exclude a clinically relevant association between VDD and subsequent epilepsy or seizure in patients with T2DM. The contribution of the present study is to evaluate this clinically relevant temporal relationship in a large T2DM population, rather than to establish causality. This study provides real-world evidence that VDD may serve as a risk marker for subsequent epilepsy or seizure in patients with T2DM. These findings should be interpreted as hypothesis-generating and complementary to genetic evidence, not as proof that vitamin D supplementation prevents epilepsy.

From a clinical perspective, serum 25(OH)D testing is widely available, and vitamin D status is routinely measurable and potentially modifiable in patients with T2DM. Although the economic burden of testing and treatment varies across countries and healthcare systems, serum 25(OH)D measurement is generally minimally invasive and clinically accessible. However, the present findings should not be interpreted as evidence that vitamin D supplementation prevents epilepsy or seizure. Rather, clinically measured VDD may help identify patients with a higher burden of metabolic, vascular, inflammatory, or nutritional vulnerability who may warrant closer clinical attention to potential neurological complications.

Clinical trials in patients with established epilepsy have begun to examine whether correction of VDD can improve seizure-related outcomes, but the findings remain preliminary and have not established a preventive effect in individuals without epilepsy (32, 33). Future prospective studies should determine whether targeted or periodic vitamin D screening improves risk identification, whether correction of VDD modifies seizure-related outcomes, and whether such strategies are clinically effective and cost-effective. These studies should also establish the appropriate screening interval and identify subgroups, such as older adults or patients with severe or persistent VDD, who may derive the greatest benefit.

Until such evidence is available, universal annual vitamin D screening solely for epilepsy prevention cannot be recommended.

Several limitations should be considered. First, residual confounding is unavoidable in observational EHR studies because several potentially relevant factors were unavailable, including sunlight exposure, seasonality, dietary habits, physical activity, socioeconomic status, vitamin D supplementation and adherence to supplementation, diabetes duration and severity, and adherence to other medications. Poorer lifestyle, socioeconomic, or diabetes-related profiles in the VDD cohort could have exaggerated the observed association, whereas supplementation or favorable behavioral changes after baseline could have attenuated it. Therefore, the direction and magnitude of the remaining residual confounding are uncertain.

Second, exposure misclassification may have occurred because vitamin D status was based on the first qualifying 25(OH)D measurement and could subsequently have changed owing to supplementation, seasonal variation, or lifestyle changes. The 5-year look-back classification, assessment of exposure durability during follow-up, and sensitivity analysis excluding patients whose vitamin D status crossed the predefined threshold partially mitigated this concern but could not replace a formal repeated-measure analysis. Information on vitamin D replacement therapy, including dose, duration, adherence, and over-the-counter supplementation, was also unavailable; treatment during follow-up may therefore have attenuated or otherwise modified the observed associations.

Third, outcome misclassification is possible because epilepsy, seizure, and epilepsy subtypes were identified using ICD-10-CM codes without confirmation by EEG findings, neurologist assessment, neuroimaging, or chart review. Although previous validation studies (34, 35) have shown generally acceptable accuracy for identifying epilepsy from administrative data, diagnostic performance varies across healthcare settings and may be less consistent for specific epilepsy subtypes. Moreover, we could not perform validation specifically within TriNetX. Therefore, some outcome misclassification remains possible, and its direction and magnitude cannot be determined.

Fourth, selection bias may arise because eligibility required a documented 25(OH)D measurement. Tested patients may have greater comorbidity burden or healthcare utilization than the broader T2DM population, and propensity score matching could not account for unmeasured determinants of testing. Therefore, the findings are most applicable to patients with T2DM who undergo vitamin D testing. Fifth, unexpected inverse associations between dyslipidemia and obesity suggest possible residual confounding, collider bias, or competing risk mechanisms. Sixth, mortality was higher in the VDD cohort and may have competed with the occurrence or ascertainment of epilepsy or seizure.

Because the cause-specific Cox model does not directly estimate cumulative incidence in the presence of competing mortality, the reported HRs should be interpreted accordingly. Although the survivor-restricted sensitivity analysis yielded consistent findings, it could not fully substitute for a formal competing-risk analysis. Finally, subgroup, sensitivity, and exposure-gradient analyses were exploratory and uncorrected for multiplicity, increasing the possibility of chance findings. Moreover, the absence of a formal trend test limits interpretation of the exposure-gradient results as evidence of a dose-response relationship.

The generalizability of these findings is limited because the study included only adults with T2DM who had documented 25(OH)D measurements. The results may therefore not apply to individuals without diabetes, pediatric populations, or patients with T2DM who do not undergo vitamin D testing.

Source: Discussion Source: Discussion Source: Discussion Source: Discussion Source: Discussion Source: Discussion Source: Discussion

Results

3.1

Patient selection and baseline characteristics

Prior to matching, 166,173 patients with VDD and 259,188 controls with normal vitamin D levels were eligible. Before matching, the proportions of missing laboratory values in the VDD and control cohorts were 18.0% and 22.5% for glucose, 26.6% and 32.6% for hemoglobin, 29.4% and 32.1% for albumin, and 34.6% and 38.2% for HbA1c, respectively. The two cohorts were imbalanced across several baseline characteristics (Table 1). The VDD group was younger (mean age, 56.0 vs. 65.0 years; SMD, 0.584), had a lower proportion of White patients (51.8% vs. 70.3%), and had a higher proportion of Black patients (25.5% vs. 12.9%).

The groups also differed in the prevalence of disorders of lipoprotein metabolism, overweight or obesity, hypertension, neoplasms, and nicotine dependence (all SMD > 0.10). After 1:1 propensity score matching, 135,329 patients remained in each group. The baseline characteristics were well balanced between the groups, with all standardized mean differences <0.10. The mean age was similar between the VDD and control groups (59.7 vs. 59.8 years), as were the proportions of women (59.4% vs. 59.8%) and White patients (59.2% vs. 59.1%).

TABLE 1

Baseline characteristics of patients with vitamin D deficiency and normal vitamin D status before and after propensity score matching.

VariablesBefore matchingAfter matching
VDD group
(n = 166,173)
Control group
(n = 259,188)
SMDVDD group
(n = 135,329)
Control group
(n = 135,329)
SMD
Patient characteristics
Age at index (years)56.0 ± 16.765.0 ± 13.90.58459.7 ± 14.859.8 ± 14.80.004
Female97617 (58.7)161495 (62.3)0.07380416 (59.4)80957 (59.8)0.008
BMI > 30 kg/m242936 (25.8)90652 (35.0)0.20037800 (27.9)38197 (28.2)0.007
White86105 (51.8)182239 (70.3)0.38680112 (59.2)79952 (59.1)0.002
Black or African American42388 (25.5)33363 (12.9)0.32526656 (19.7)27043 (20.0)0.007
Asian6937 (4.2)14313 (5.5)0.0636347 (4.7)5984 (4.4)0.013
Comorbidities and health services
Factors influencing health status and contact with health services124569 (75.0)197772 (76.3)0.031101317 (74.9)101616 (75.1)0.005
Essential (primary) hypertension95435 (57.4)166032 (64.1)0.13681224 (60.0)81677 (60.4)0.007
Disorders of lipoprotein metabolism and other lipidemias85461 (51.4)165745 (63.9)0.25575942 (56.1)76319 (56.4)0.006
Overweight and obesity61944 (37.3)70839 (27.3)0.21445001 (33.3)45188 (33.4)0.003
Neoplasms36325 (21.9)71989 (27.8)0.13732323 (23.9)32092 (23.7)0.004
Ischemic heart diseases22680 (13.6)43041 (16.6)0.08320234 (15.0)19989 (14.8)0.005
Obstructive sleep apnea20577 (12.4)30206 (11.7)0.02216533 (12.2)16307 (12.1)0.005
Anemias18708 (11.3)30214 (11.7)0.01315143 (11.2)15169 (11.2)0.001
Chronic kidney disease16425 (9.9)33688 (13.0)0.09814611 (10.8)14493 (10.7)0.003
Nicotine dependence19359 (11.7)17966 (6.9)0.16313180 (9.7)13400 (9.9)0.005
Diseases of liver13699 (8.2)19662 (7.6)0.02411055 (8.2)10844 (8.0)0.006
COPD10551 (6.3)16189 (6.2)0.0048935 (6.6)8946 (6.6)0.000
Cerebrovascular diseases10054 (6.1)18872 (7.3)0.0498895 (6.6)8831 (6.5)0.002
T2DM with kidney complications9570 (5.8)18304 (7.1)0.0538373 (6.2)8229 (6.1)0.004
T2DM with neurological complications8367 (5.0)13763 (5.3)0.0127096 (5.2)6916 (5.1)0.006
COVID-196752 (4.1)10602 (4.1)0.0015404 (4.0)5405 (4.0)0.000
T2DM with ophthalmic complications6006 (3.6)8670 (3.3)0.0154908 (3.6)4887 (3.6)0.001
Alcohol related disorders4361 (2.6)3845 (1.5)0.0812874 (2.1)2820 (2.1)0.003
T2DM with hypoglycemia2460 (1.5)3327 (1.3)0.0171928 (1.4)1851 (1.4)0.005
Malnutrition1946 (1.2)2695 (1.0)0.0131537 (1.1)1493 (1.1)0.003
Medications
Metformin52531 (31.6)79368 (30.6)0.02142115 (31.1)41903 (31.0)0.003
Insulins and analogues40334 (24.3)49981 (19.3)0.12130445 (22.5)30314 (22.4)0.002
Vitamin D32296 (19.4)47926 (18.5)0.02425091 (18.5)25086 (18.5)0.000
GLP-1 analogues10524 (6.3)18447 (7.1)0.0318964 (6.6)8829 (6.5)0.004
SGLT2 inhibitors7491 (4.5)15062 (5.8)0.0596738 (5.0)6670 (4.9)0.002
Laboratory data
Glucose < 70 mg/dL10913 (6.6)13102 (5.1)0.0658192 (6.1)8185 (6.0)0.000
Hemoglobin > 12 g/dL110054 (66.2)160298 (61.8)0.09188358 (65.3)88757 (65.6)0.006
Albumin > 3.5 g/dL111653 (67.2)171529 (66.2)0.02190519 (66.9)90780 (67.1)0.004

Data are presented as number (%) or mean ± standard deviation. Vitamin D deficiency was defined as serum 25-hydroxyvitamin D < 20 ng/mL, and normal vitamin D status was defined as serum 25-hydroxyvitamin D ≥ 30 ng/mL. Standardized mean differences <0.10 were considered acceptable for covariate balance. COPD, chronic obstructive pulmonary disease; GLP-1, glucagon-like peptide-1; SGLT2, sodium-glucose cotransporter 2; SMD, standardized mean difference; T2DM, type 2 diabetes mellitus; VDD, vitamin D deficiency.

3.2

Primary and secondary outcomes

The mean follow-up durations were 5.0 years in the VDD group and 4.9 years in the control group, and the corresponding median durations were 4.5 and 4.3 years. VDD was associated with a higher risk of incident epilepsy or seizure than normal vitamin D status (1,486 [1.10%] vs. 1,050 [0.78%]; HR, 1.37; 95% CI, 1.26 to 1.48; p < 0.001) (Table 2). The proportional hazards assumption was not violated for the primary outcome based on the Schoenfeld residual test (p = 0.951).

Although the relative association was statistically significant, the absolute incidence difference was small (0.32 percentage points). The primary outcome E-value was 2.08 for the point estimate and 1.83 for the lower 95% confidence interval bound, meaning that an unmeasured confounder would need to be associated with both VDD and incident epilepsy or seizure by risk ratios of at least 2.08 each, beyond the measured covariates, to fully explain the observed association. Although the absolute incidence was low in both groups, similar associations were observed for focal epilepsy (HR, 1.40; p < 0.001), generalized epilepsy (HR, 1.42; p = 0.003), and intractable epilepsy (HR, 1.92; p < 0.001), with the largest relative estimate observed in intractable epilepsy.

VDD was also associated with greater antiepileptic medication use (HR, 1.25; p < 0.001) and higher all-cause mortality (9.43% vs. 6.18%; HR, 1.47; p < 0.001).

TABLE 2

Association between vitamin D deficiency and risks of epilepsy-related outcomes and mortality in patients with type 2 diabetes.

OutcomeVDD group
(n = 135,329)
Control group
(n = 135,329)
HR (95% CI)P-valueAbsolute risk difference (percentage points)
Events (%)Events (%)
Primary outcome
Epilepsy or seizure1,486 (1.10)1,050 (0.78)1.37 (1.26 to 1.48)<0.0010.32
Secondary outcomes
Focal epilepsy353 (0.26)243 (0.18)1.40 (1.19 to 1.65)<0.0010.08
Generalized epilepsy175 (0.13)118 (0.09)1.42 (1.13 to 1.80)0.0030.04
Intractable epilepsy87 (0.06)43 (0.03)1.92 (1.33 to 2.76)<0.0010.03
Antiepileptics25,138 (18.58)20,294 (15.00)1.25 (1.23 to 1.27)<0.0013.58
Mortality12,766 (9.43)8,366 (6.18)1.47 (1.43 to 1.51)<0.0013.25

Data are presented as number of events (%). Absolute risk difference was calculated as the event percentage in the VDD group minus that in the control group and is expressed in percentage points. CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency.

3.3

Control and supportive outcomes

The prespecified control outcomes showed an expected pattern. The positive control, secondary hyperparathyroidism, was more frequent in the VDD group (HR, 1.50; p < 0.001), whereas the negative control, acute appendicitis, was not significantly associated with VDD (HR, 1.08; p = 0.298) (Table 3). Follow-up healthcare encounters were slightly less frequent in the VDD group (HR, 0.92; p < 0.001), suggesting that greater surveillance among exposed patients was unlikely to fully explain the observed associations. Subsequent low 25(OH)D levels during follow-up were substantially more common in the VDD group (HR, 3.62; p < 0.001), supporting the durability of the baseline exposure classification.

TABLE 3

Control and supportive outcome analyses after propensity score matching.

OutcomeVDD group (n = 135,329)Control group (n = 135,329)HR (95% CI)P-value
Events (%)Events (%)
Secondary hyperparathyroidism483 (0.36)314 (0.23)1.50 (1.30 to 1.73)<0.001
Acute appendicitis378 (0.28)336 (0.25)1.08 (0.93 to 1.25)0.298
Any follow-up healthcare encounter123,887 (91.55)126,370 (93.38)0.92 (0.91 to 0.93)<0.001
Subsequent VDD during follow-up19,578 (14.47)5,754 (4.25)3.62 (3.51 to 3.73)<0.001

Data are presented as number of events (%). Secondary hyperparathyroidism was used as a positive control outcome, whereas acute appendicitis was used as a negative control outcome. Follow-up healthcare encounters were assessed to examine potential surveillance bias, and subsequent VDD during follow-up was assessed to evaluate exposure durability. CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency.

3.4

Sensitivity and subgroup analyses

The primary association remained stable across all four sensitivity models, with HRs ranging from 1.29 to 1.42 (all p < 0.001). The association with mortality also persisted in models in which mortality could be assessed, except for Model I, in which mortality was not applicable because the analysis was restricted to patients who survived throughout the follow-up. Intractable epilepsy consistently showed the largest relative estimates across the sensitivity models (HR range, 1.62 to 1.76) (Table 4).

TABLE 4

Sensitivity analyses for the association between vitamin D deficiency and risks of epilepsy-related outcomes.

OutcomesModel IModel IIModel IIIModel IV
HR (95% CI)P-valueHR (95% CI)P-valueHR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.29 (1.17 to 1.41)<0.0011.35 (1.25 to 1.46)<0.0011.32 (1.22 to 1.43)<0.0011.42 (1.28 to 1.58)<0.001
Focal epilepsy1.24 (1.02 to 1.50)0.0271.38 (1.17 to 1.62)<0.0011.38 (1.17 to 1.63)<0.0011.50 (1.21 to 1.86)<0.001
Generalized epilepsy1.40 (1.05 to 1.85)0.0201.40 (1.10 to 1.78)0.0061.30 (1.03 to 1.65)0.0251.57 (1.15 to 2.15)0.004
Intractable epilepsy1.68 (1.11 to 2.55)0.0131.75 (1.22 to 2.51)0.0021.62 (1.13 to 2.32)0.0081.76 (1.13 to 2.74)0.011
Antiepileptics1.24 (1.21 to 1.26)<0.0011.25 (1.22 to 1.27)<0.0011.23 (1.21 to 1.25)<0.0011.18 (1.15 to 1.21)<0.001
MortalityNANA1.48 (1.44 to 1.52)<0.0011.48 (1.44 to 1.53)<0.0011.80 (1.74 to 1.87)<0.001

Model I was restricted to patients who survived throughout follow-up. Model II was restricted to patients with at least one recorded healthcare encounter during follow-up. Model III excluded patients with a previous history of hypoglycemia. Model IV excluded patients whose vitamin D status crossed the prespecified exposure threshold during follow-up, defined as 25-hydroxyvitamin D ≥ 20 ng/mL in the VDD group or <30 ng/mL in the control group. CI, confidence interval; HR, hazard ratio; NA, not applicable; VDD, vitamin D deficiency.

In age-stratified analyses, the association with the primary outcome was stronger among patients older than 65 years (HR, 1.44, p < 0.001) than among those aged 18 to 65 years (HR, 1.15, p = 0.039), with a significant interaction (p for interaction = 0.006) (Table 5). Significant interactions were also observed for focal epilepsy and antiepileptic drug use (p for interaction = 0.026 and <0.001, respectively), with stronger estimates in the older stratum. In sex-stratified analyses (Table 6), the estimate for the primary outcome was numerically higher in women (HR, 1.49, p < 0.001) than in men (HR, 1.20, p = 0.004), although the interaction for the primary outcome did not reach statistical significance (p for interaction = 0.084).

Significant interactions were observed for focal epilepsy and antiepileptic medication use (p for interaction = 0.006 for both), with stronger estimates in women.

TABLE 5

Age-stratified subgroup analyses for the association between vitamin D deficiency and risks of epilepsy-related outcomes.

Outcomes18 to 65 years>65 yearsp for
(n = 59,286 for each group)(n = 75,041 for each group)interaction
HR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.15 (1.01 to 1.31)0.0391.44 (1.31 to 1.59)<0.0010.006
Focal epilepsy1.05 (0.79 to 1.39)0.7601.54 (1.26 to 1.88)<0.0010.026
Generalized epilepsy1.08 (0.72 to 1.63)0.6951.57 (1.17 to 2.10)0.0030.140
Intractable epilepsy1.75 (1.02 to 3.02)0.0402.05 (1.26 to 3.32)0.0030.682
Antiepileptics1.18 (1.15 to 1.22)<0.0011.28 (1.25 to 1.31)<0.001<0.001
Mortality1.45 (1.34 to 1.57)<0.0011.46 (1.42 to 1.50)<0.0010.872

CI, confidence interval; HR, hazard ratio.

TABLE 6

Sex-stratified subgroup analyses for the association between vitamin D deficiency and risks of epilepsy-related outcomes.

OutcomesMaleFemaleP for interaction
(n = 54,116 for each group)(n = 80,855 for each group)
HR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.20 (1.06 to 1.37)0.0041.49 (1.34 to 1.64)<0.0010.084
Focal epilepsy1.06 (0.83 to 1.37)0.6321.71 (1.37 to 2.12)<0.0010.006
Generalized epilepsy1.25 (0.85 to 1.85)0.2571.44 (1.07 to 1.95)0.0170.576
Intractable epilepsy1.49 (0.76 to 2.91)0.2421.99 (1.29 to 3.05)0.0010.481
Antiepileptics1.20 (1.16 to 1.24)<0.0011.27 (1.24 to 1.30)<0.0010.006
Mortality1.42 (1.37 to 1.48)<0.0011.48 (1.43 to 1.54)<0.0010.131

CI, confidence interval; HR, hazard ratio.

3.5

Multivariable cox regression

Within the entire unmatched cohort (Table 7), the link between VDD and incident epilepsy or seizure persisted even after adjusting for demographic and clinical covariates concurrently (HR, 1.41, p < 0.001). The strongest covariate associations were cerebrovascular disease (2.61, p < 0.001) and alcohol-related disorders (HR, 2.26, p < 0.001), followed by a recorded glucose level <70 mg/dL (HR, 1.93, p < 0.001), chronic kidney disease (HR, 1.37, p < 0.001), nicotine dependence (HR, 1.31, p < 0.001), hemoglobin A1c ≥ 9% (HR, 1.16, p = 0.003), and ischemic heart disease (HR, 1.14, p = 0.008).

In contrast, disorders of lipoprotein metabolism (HR, 0.76, p < 0.001) and overweight or obesity (HR, 0.88, p = 0.002) were inversely associated with the outcome.

TABLE 7

Multivariable Cox regression model for incident epilepsy or seizure in the unmatched cohort.

VariableHR (95% CI)P-value
VDD vs. control group1.41 (1.31 to 1.51)<0.001
Male0.95 (0.88 to 1.02)0.145
Age at index1.01 (1.01 to 1.01)<0.001
White1.02 (0.95 to 1.10)0.594
Essential hypertension0.99 (0.91 to 1.08)0.788
Disorders of lipoprotein metabolism and other lipidemias0.76 (0.70 to 0.82)<0.001
Overweight and obesity0.88 (0.81 to 0.95)0.002
Chronic kidney disease1.37 (1.24 to 1.51)<0.001
Ischemic heart diseases1.14 (1.04 to 1.25)0.008
Nicotine dependence1.31 (1.18 to 1.47)<0.001
Cerebrovascular diseases2.61 (2.36 to 2.88)<0.001
Alcohol-related disorders2.26 (1.91 to 2.67)<0.001
Type 2 diabetes mellitus with hypoglycemia1.16 (0.90 to 1.48)0.258
Glucose < 70 mg/dL1.93 (1.73 to 2.14)<0.001
Hemoglobin A1c ≥ 9%1.16 (1.05 to 1.28)0.003
Diseases of liver1.07 (0.95 to 1.22)0.275

CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency.

3.6

Exposure-gradient analysis

Across vitamin D categories, a graded association was observed for the primary outcome of epilepsy or seizure, with progressively higher estimates from vitamin D insufficiency to VDD and severe VDD, with HRs of 1.23, 1.37, and 1.44, respectively (all p < 0.001) (Table 8). Similar graded patterns were observed for focal epilepsy (HRs 1.13, 1.40, and 1.63), intractable epilepsy (HRs 1.85, 1.92, and 2.38), antiepileptic medication use (HRs 1.18, 1.25, and 1.34), and mortality (HRs 1.19, 1.47, and 1.67).

In contrast, the gradient was less consistent for generalized epilepsy, for which the estimates of vitamin D insufficiency and VDD were similar. Overall, these exploratory findings suggest a graded association with most epilepsy-related outcomes, except generalized epilepsy.

TABLE 8

Exposure-gradient analysis comparing severe vitamin D deficiency, vitamin D deficiency, and vitamin D insufficiency with normal vitamin D status.

OutcomesSevere VDD
(n = 41,597 for each group)
VDD (primary analysis)
(n = 135,329 for each group)
VDI
(n = 185,674 for each group)
HR (95% CI)P-valueHR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.44 (1.27 to 1.64)<0.0011.37 (1.26 to 1.48)<0.0011.23 (1.15 to 1.32)<0.001
Focal epilepsy1.63 (1.25 to 2.13)<0.0011.40 (1.19 to 1.65)<0.0011.13 (0.98 to 1.31)0.087
Generalized epilepsy1.63 (1.14 to 2.33)0.0061.42 (1.13 to 1.80)0.0031.42 (1.15 to 1.76)0.001
Intractable epilepsy2.38 (1.36 to 4.18)0.0021.92 (1.33 to 2.76)<0.0011.85 (1.33 to 2.58)<0.001
Antiepileptics1.34 (1.30 to 1.39)<0.0011.25 (1.23 to 1.27)<0.0011.18 (1.16 to 1.20)<0.001
Mortality1.67 (1.59 to 1.75)<0.0011.47 (1.43 to 1.51)<0.0011.19 (1.16 to 1.22)<0.001

Severe VDD was defined as 25-hydroxyvitamin D < 10 ng/mL, VDD as <20 ng/mL, vitamin D insufficiency as 20 to 29.9 ng/mL, and normal vitamin D status as ≥30 ng/mL. These analyses were exploratory, and no formal trend test was performed. CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency; VDI, vitamin D insufficiency.

Source: Results Source: Results Source: Results Source: Results Source: Results Source: Results

Conclusion

Among adults with T2DM, clinically measured VDD was associated with a higher long-term risk of incident epilepsy or seizure. The strongest relative estimate was observed for intractable epilepsy, and risk estimates generally increased across progressively lower vitamin D categories. These findings suggest that VDD may serve as a clinically relevant risk marker in this population, but they do not establish a causal relationship or demonstrate that vitamin D supplementation can prevent epilepsy or seizure.

Source: Conclusion
Authors’ abstract

Background

Type 2 diabetes mellitus (T2DM) is associated with an increased risk of seizures and epilepsy; however, clinically measurable factors contributing to this risk remain unclear. Given the high prevalence of vitamin D deficiency (VDD) in T2DM and its potential effects on neuronal excitability, this study aimed to investigate the association between VDD and the long-term risk of incident epilepsy or seizure in adults with T2DM.

Methods

We conducted a retrospective propensity score: matched cohort study using the TriNetX Global Collaborative Network. Adults with T2DM and a recorded 25-hydroxyvitamin D measurement between 2013 and 2023 were classified as having VDD (<20 ng/mL) or normal vitamin D levels (≥30 ng/mL). The primary outcome was incident epilepsy or seizure during an analytic window extending up to 12 years after the index date. The secondary outcomes included epilepsy subtypes, antiepileptic medication use, and all-cause mortality.

Results

After matching, 135,329 patients were included in each cohort. VDD was associated with a higher risk of incident epilepsy or seizure than normal vitamin D status (1.10% vs. 0.78%; HR, 1.37; 95% CI, 1.26 to 1.48; p < 0.001). Similar associations were observed for focal (HR, 1.40; p < 0.001), generalized (HR, 1.42; p = 0.003), and intractable epilepsy (HR, 1.92; p < 0.001). VDD was also associated with greater antiepileptic medication use (HR, 1.25; p < 0.001) and higher all-cause mortality (HR, 1.47; p < 0.001).

The association with the primary outcome remained stable across the sensitivity analyses and was generally consistent in the subgroup analyses stratified by sex and age. Exploratory exposure-gradient analyses showed progressively higher risk estimates with worsening vitamin D status.

Conclusion

Among adults with T2DM, VDD was associated with a higher long-term risk of incident epilepsy or seizure, particularly intractable epilepsy. These findings suggest that VDD may serve as a clinically relevant risk marker; however, they do not establish causality or demonstrate that vitamin D supplementation prevents epilepsy or seizure.

Read the full paper
1

Introduction

Type 2 diabetes mellitus (T2DM) is one of the most prevalent chronic diseases worldwide and is accompanied by a wide range of neurological and metabolic complications (1Not reported4). Patients with T2DM have an elevated burden of seizures and epilepsy, attributable in part to recurrent hypoglycemia, cerebral microvascular disease, cerebrovascular events, autonomic and metabolic dysregulation, and chronic neuroinflammation (5Not reported10). These risk factors may coexist and accumulate over time, making seizure-related outcomes an important but relatively under-recognized neurological complication in this population (8, 11, 12).

Therefore, identifying the factors associated with this elevated risk is of clinical interest.

Vitamin D deficiency (VDD) is highly prevalent among patients with T2DM and may reflect a combination of inadequate sunlight exposure, adiposity, chronic inflammation, renal dysfunction, and altered metabolic health (13Not reported15). Beyond its classical role in bone and mineral metabolism, vitamin D exerts neuromodulatory effects by regulating intracellular calcium homeostasis, neurotrophin expression, and anti-inflammatory and antioxidant pathways, which are biologically relevant to neuronal excitability and seizure susceptibility (16, 17). These observations raise the possibility that low vitamin D status may be associated with a higher risk of epilepsy, particularly in T2DM, in which VDD is common and seizure risk is already elevated.

However, existing evidence is limited and largely indirect. Most clinical studies have examined the reverse relationship, reporting a high prevalence of VDD among patients already diagnosed with epilepsy, partly related to long-term use of antiseizure medications (18Not reported20). Mendelian randomization studies evaluating genetically predicted 25(OH)D levels and epilepsy risk have reported inconsistent or largely null findings (21Not reported23). However, such studies (21Not reported23) did not directly determine whether clinically measured VDD precedes incident epilepsy or seizure in real-world patients.

Few longitudinal cohort studies have examined this temporal relationship, and none have specifically focused on patients with T2DM, in whom both VDD and seizure-related risk factors are common.

To address this gap, we conducted a large, multinational, propensity score: matched cohort study using real-world data to examine the association between VDD and the long-term risk of incident epilepsy and seizure in adults with T2DM. We further assessed epilepsy subtypes, antiepileptic drug use, mortality, and possible exposure-gradient relationships to characterize the robustness and consistency of this association.

2

Materials and methods

2.1

Study design and data source

We conducted a retrospective, propensity score: matched cohort study using the TriNetX Global Collaborative Network, a federated platform aggregating de-identified electronic health records from more than 150 healthcare organizations across multiple regions. The TriNetX platform has been extensively used in peer-reviewed studies across a broad range of clinical disciplines (24Not reported27). Because only aggregated, de-identified data were analyzed, the requirement for individual informed consent was waived. The study was approved by the Institutional Review Board of Chi Mei Medical Center and conducted in accordance with the Declaration of Helsinki.

2.2

Exposure classification

We identified adults aged ≥18 years with type 2 diabetes mellitus (T2DM) who had a recorded serum or plasma 25-hydroxyvitamin D [25(OH)D] measurement between January 1, 2013, and December 31, 2023. T2DM was defined using the ICD-10-CM code E11. Vitamin D status was based on the first qualifying 25(OH)D measurement during the study period. VDD was defined as a serum or plasma 25(OH)D level <20 ng/mL, whereas the control cohort comprised patients with levels ≥30 ng/mL. Laboratory data within the network are harmonized to common clinical concepts and measurement units.

However, information regarding assay manufacturers, analytical platforms, calibration procedures, and local quality-control practices was unavailable; therefore, we could not confirm that 25(OH)D assays were analytically standardized across participating healthcare organizations. The index date was defined as the date of the first qualifying vitamin D measurement that met the exposure definition. Eligible patients were required to have at least one healthcare encounter within 5 years before the index date to ensure adequate capture of baseline data. A 5-year look-back was further applied to confirm persistent rather than transient vitamin D status: patients with VDD who had any prior measurement ≥20 ng/mL and controls who had any prior measurement <30 ng/mL were excluded from the study.

2.3

Exclusion criteria and landmark analysis

Patients were excluded if they had a diagnosis of epilepsy or recurrent seizures (ICD-10-CM G40) or any recorded antiepileptic medication use before or during the 1-year period after the index date to reduce the likelihood of including patients with pre-existing epileptic disorders or early events temporally unrelated to vitamin D status. Patients who died within 1 year after the index date were also excluded, consistent with the 1-year landmark design used to reduce early reverse causation and survivorship bias in the study.

Additional exclusions were applied to reduce confounding by conditions that may substantially affect vitamin D metabolism, nutritional status, seizure risk, or outcome ascertainment. Patients were excluded if they had end-stage renal disease, stage 4 or 5 chronic kidney disease, dependence on renal dialysis, human immunodeficiency virus infection, liver fibrosis or cirrhosis, celiac disease, Crohn’s disease, short bowel syndrome, or pancreatic diseases before the index date. Patients with acute perturbations within 1 month before the index date (pregnancy, recent critical care, acute kidney failure, and sepsis), which can transiently depress 25(OH)D levels, were also excluded.

We additionally excluded patients with major neurological conditions that independently predispose them to seizures, including intracranial injury, CNS neoplasms, encephalitis or myelitis, anoxic brain injury, cerebral palsy, dementia, and Alzheimer’s disease. The diagnostic codes used to define the exclusion criteria are summarized in Supplementary Table 1.

2.4

Propensity score matching

Patients in the VDD and control cohorts were matched 1:1 using greedy nearest-neighbor matching with a caliper width equal to 0.1 times the pooled standard deviation of the logit of the propensity score. Propensity scores were estimated using a logistic model incorporating demographics, comorbidities, medications, healthcare utilization, and laboratory values. We specifically included factors known to independently influence seizure risk in diabetes, including diabetes-related complications and prior hypoglycemia, because both can provoke seizures irrespective of vitamin D levels and would confound the association.

Missing laboratory values were not imputed. Covariate balance was evaluated using standardized mean differences, with a value <0.10 indicating an acceptable balance. The codes used for all the matching variables are detailed in Supplementary Table 2.

2.5

Study outcomes

The primary outcome was incident epilepsy or seizure, defined using ICD-10-CM code G40, during an analytic window extending up to 12 years after the index date. Secondary outcomes assessed over the same period included epilepsy subtypes (focal, generalized, and intractable epilepsy), antiepileptic medication use, and mortality. Follow-up began after the completion of the 1-year landmark period and continued until the first occurrence of the outcome of interest, death, loss to follow-up, or the end of the study window, whichever occurred first.

Two control outcomes were prespecified: secondary hyperparathyroidism, a biologically plausible positive control related to VDD, and acute appendicitis, a negative control with no expected association with the vitamin D status. These outcomes were used to contextualize the specificity of the observed associations and assess potential residual confounding or surveillance-related artifacts. Subsequent low 25(OH)D levels during follow-up were evaluated to assess exposure durability, and the occurrence of at least one follow-up healthcare encounter was compared between groups to examine potential surveillance bias.

The diagnostic codes for all outcomes are provided in Supplementary Table 3.

2.6

Sensitivity, subgroup, and multivariable analyses

Robustness was assessed using four sensitivity models, each addressing a distinct potential source of bias. Model I was restricted to patients who survived the follow-up period to evaluate whether the association persisted independent of differential mortality between groups. Model II was restricted to patients with at least one recorded follow-up encounter, ensuring comparable opportunities for outcome ascertainment and reducing potential detection bias. Model III excluded patients with prior hypoglycemia because hypoglycemia is a recognized seizure precipitant that may confound the association independently of vitamin D status.

Model IV excluded patients whose vitamin D status crossed the pre-specified exposure threshold during follow-up, thereby reducing time-varying exposure misclassification.

Prespecified subgroup analyses were conducted by age (18 to 65 and >65 years) and sex, with interaction terms used to assess potential effect modification. As a complementary analysis independent of propensity score matching, we fitted a multivariable Cox proportional hazards model in the full unmatched cohort, adjusting for sex, age, race, hypertension, dyslipidemia, overweight/obesity, chronic kidney disease, ischemic heart disease, nicotine dependence, cerebrovascular disease, alcohol-related disorders, hypoglycemia, glycemic control, and liver disease.

2.7

Exposure-gradient analysis

To explore the exposure-gradient relationship beyond the primary VDD analysis, we performed additional matched comparisons for severe VDD (<10 ng/mL) and vitamin D insufficiency (20 to 29.9 ng/mL), each against normal vitamin D status (≥30 ng/mL), using the same propensity score matching strategy and outcome definitions as in the primary analysis. Progressively higher risk estimates across vitamin D insufficiency, VDD, and severe VDD were considered consistent with an exposure-gradient pattern. A formal trend test was not performed because this function was not available within the TriNetX analytic platform.

2.8

Statistical methods

The primary analysis used a cause-specific Cox proportional hazards framework. Hazard ratios (HRs) with 95% confidence intervals (CIs) were estimated, and survival was compared using Kaplan: Meier curves with the log-rank test. The proportional hazards assumption was evaluated using Schoenfeld residuals. E-values were computed for the primary outcome to assess the sensitivity to potential unmeasured confounding. Analyses were performed using the TriNetX Analytics platform. Statistical significance for the primary endpoint was defined using a two-sided α level of 0.05. All secondary, control, sensitivity, subgroup, and exposure-gradient analyses were treated as exploratory, with no adjustment for multiple comparisons.

3

Results

3.1

Patient selection and baseline characteristics

Prior to matching, 166,173 patients with VDD and 259,188 controls with normal vitamin D levels were eligible. Before matching, the proportions of missing laboratory values in the VDD and control cohorts were 18.0% and 22.5% for glucose, 26.6% and 32.6% for hemoglobin, 29.4% and 32.1% for albumin, and 34.6% and 38.2% for HbA1c, respectively. The two cohorts were imbalanced across several baseline characteristics (Table 1). The VDD group was younger (mean age, 56.0 vs. 65.0 years; SMD, 0.584), had a lower proportion of White patients (51.8% vs. 70.3%), and had a higher proportion of Black patients (25.5% vs. 12.9%).

The groups also differed in the prevalence of disorders of lipoprotein metabolism, overweight or obesity, hypertension, neoplasms, and nicotine dependence (all SMD > 0.10). After 1:1 propensity score matching, 135,329 patients remained in each group. The baseline characteristics were well balanced between the groups, with all standardized mean differences <0.10. The mean age was similar between the VDD and control groups (59.7 vs. 59.8 years), as were the proportions of women (59.4% vs. 59.8%) and White patients (59.2% vs. 59.1%).

TABLE 1

Baseline characteristics of patients with vitamin D deficiency and normal vitamin D status before and after propensity score matching.

VariablesBefore matchingAfter matching
VDD group
(n = 166,173)
Control group
(n = 259,188)
SMDVDD group
(n = 135,329)
Control group
(n = 135,329)
SMD
Patient characteristics
Age at index (years)56.0 ± 16.765.0 ± 13.90.58459.7 ± 14.859.8 ± 14.80.004
Female97617 (58.7)161495 (62.3)0.07380416 (59.4)80957 (59.8)0.008
BMI > 30 kg/m242936 (25.8)90652 (35.0)0.20037800 (27.9)38197 (28.2)0.007
White86105 (51.8)182239 (70.3)0.38680112 (59.2)79952 (59.1)0.002
Black or African American42388 (25.5)33363 (12.9)0.32526656 (19.7)27043 (20.0)0.007
Asian6937 (4.2)14313 (5.5)0.0636347 (4.7)5984 (4.4)0.013
Comorbidities and health services
Factors influencing health status and contact with health services124569 (75.0)197772 (76.3)0.031101317 (74.9)101616 (75.1)0.005
Essential (primary) hypertension95435 (57.4)166032 (64.1)0.13681224 (60.0)81677 (60.4)0.007
Disorders of lipoprotein metabolism and other lipidemias85461 (51.4)165745 (63.9)0.25575942 (56.1)76319 (56.4)0.006
Overweight and obesity61944 (37.3)70839 (27.3)0.21445001 (33.3)45188 (33.4)0.003
Neoplasms36325 (21.9)71989 (27.8)0.13732323 (23.9)32092 (23.7)0.004
Ischemic heart diseases22680 (13.6)43041 (16.6)0.08320234 (15.0)19989 (14.8)0.005
Obstructive sleep apnea20577 (12.4)30206 (11.7)0.02216533 (12.2)16307 (12.1)0.005
Anemias18708 (11.3)30214 (11.7)0.01315143 (11.2)15169 (11.2)0.001
Chronic kidney disease16425 (9.9)33688 (13.0)0.09814611 (10.8)14493 (10.7)0.003
Nicotine dependence19359 (11.7)17966 (6.9)0.16313180 (9.7)13400 (9.9)0.005
Diseases of liver13699 (8.2)19662 (7.6)0.02411055 (8.2)10844 (8.0)0.006
COPD10551 (6.3)16189 (6.2)0.0048935 (6.6)8946 (6.6)0.000
Cerebrovascular diseases10054 (6.1)18872 (7.3)0.0498895 (6.6)8831 (6.5)0.002
T2DM with kidney complications9570 (5.8)18304 (7.1)0.0538373 (6.2)8229 (6.1)0.004
T2DM with neurological complications8367 (5.0)13763 (5.3)0.0127096 (5.2)6916 (5.1)0.006
COVID-196752 (4.1)10602 (4.1)0.0015404 (4.0)5405 (4.0)0.000
T2DM with ophthalmic complications6006 (3.6)8670 (3.3)0.0154908 (3.6)4887 (3.6)0.001
Alcohol related disorders4361 (2.6)3845 (1.5)0.0812874 (2.1)2820 (2.1)0.003
T2DM with hypoglycemia2460 (1.5)3327 (1.3)0.0171928 (1.4)1851 (1.4)0.005
Malnutrition1946 (1.2)2695 (1.0)0.0131537 (1.1)1493 (1.1)0.003
Medications
Metformin52531 (31.6)79368 (30.6)0.02142115 (31.1)41903 (31.0)0.003
Insulins and analogues40334 (24.3)49981 (19.3)0.12130445 (22.5)30314 (22.4)0.002
Vitamin D32296 (19.4)47926 (18.5)0.02425091 (18.5)25086 (18.5)0.000
GLP-1 analogues10524 (6.3)18447 (7.1)0.0318964 (6.6)8829 (6.5)0.004
SGLT2 inhibitors7491 (4.5)15062 (5.8)0.0596738 (5.0)6670 (4.9)0.002
Laboratory data
Glucose < 70 mg/dL10913 (6.6)13102 (5.1)0.0658192 (6.1)8185 (6.0)0.000
Hemoglobin > 12 g/dL110054 (66.2)160298 (61.8)0.09188358 (65.3)88757 (65.6)0.006
Albumin > 3.5 g/dL111653 (67.2)171529 (66.2)0.02190519 (66.9)90780 (67.1)0.004

Data are presented as number (%) or mean ± standard deviation. Vitamin D deficiency was defined as serum 25-hydroxyvitamin D < 20 ng/mL, and normal vitamin D status was defined as serum 25-hydroxyvitamin D ≥ 30 ng/mL. Standardized mean differences <0.10 were considered acceptable for covariate balance. COPD, chronic obstructive pulmonary disease; GLP-1, glucagon-like peptide-1; SGLT2, sodium-glucose cotransporter 2; SMD, standardized mean difference; T2DM, type 2 diabetes mellitus; VDD, vitamin D deficiency.

3.2

Primary and secondary outcomes

The mean follow-up durations were 5.0 years in the VDD group and 4.9 years in the control group, and the corresponding median durations were 4.5 and 4.3 years. VDD was associated with a higher risk of incident epilepsy or seizure than normal vitamin D status (1,486 [1.10%] vs. 1,050 [0.78%]; HR, 1.37; 95% CI, 1.26 to 1.48; p < 0.001) (Table 2). The proportional hazards assumption was not violated for the primary outcome based on the Schoenfeld residual test (p = 0.951).

Although the relative association was statistically significant, the absolute incidence difference was small (0.32 percentage points). The primary outcome E-value was 2.08 for the point estimate and 1.83 for the lower 95% confidence interval bound, meaning that an unmeasured confounder would need to be associated with both VDD and incident epilepsy or seizure by risk ratios of at least 2.08 each, beyond the measured covariates, to fully explain the observed association. Although the absolute incidence was low in both groups, similar associations were observed for focal epilepsy (HR, 1.40; p < 0.001), generalized epilepsy (HR, 1.42; p = 0.003), and intractable epilepsy (HR, 1.92; p < 0.001), with the largest relative estimate observed in intractable epilepsy.

VDD was also associated with greater antiepileptic medication use (HR, 1.25; p < 0.001) and higher all-cause mortality (9.43% vs. 6.18%; HR, 1.47; p < 0.001).

TABLE 2

Association between vitamin D deficiency and risks of epilepsy-related outcomes and mortality in patients with type 2 diabetes.

OutcomeVDD group
(n = 135,329)
Control group
(n = 135,329)
HR (95% CI)P-valueAbsolute risk difference (percentage points)
Events (%)Events (%)
Primary outcome
Epilepsy or seizure1,486 (1.10)1,050 (0.78)1.37 (1.26 to 1.48)<0.0010.32
Secondary outcomes
Focal epilepsy353 (0.26)243 (0.18)1.40 (1.19 to 1.65)<0.0010.08
Generalized epilepsy175 (0.13)118 (0.09)1.42 (1.13 to 1.80)0.0030.04
Intractable epilepsy87 (0.06)43 (0.03)1.92 (1.33 to 2.76)<0.0010.03
Antiepileptics25,138 (18.58)20,294 (15.00)1.25 (1.23 to 1.27)<0.0013.58
Mortality12,766 (9.43)8,366 (6.18)1.47 (1.43 to 1.51)<0.0013.25

Data are presented as number of events (%). Absolute risk difference was calculated as the event percentage in the VDD group minus that in the control group and is expressed in percentage points. CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency.

3.3

Control and supportive outcomes

The prespecified control outcomes showed an expected pattern. The positive control, secondary hyperparathyroidism, was more frequent in the VDD group (HR, 1.50; p < 0.001), whereas the negative control, acute appendicitis, was not significantly associated with VDD (HR, 1.08; p = 0.298) (Table 3). Follow-up healthcare encounters were slightly less frequent in the VDD group (HR, 0.92; p < 0.001), suggesting that greater surveillance among exposed patients was unlikely to fully explain the observed associations. Subsequent low 25(OH)D levels during follow-up were substantially more common in the VDD group (HR, 3.62; p < 0.001), supporting the durability of the baseline exposure classification.

TABLE 3

Control and supportive outcome analyses after propensity score matching.

OutcomeVDD group (n = 135,329)Control group (n = 135,329)HR (95% CI)P-value
Events (%)Events (%)
Secondary hyperparathyroidism483 (0.36)314 (0.23)1.50 (1.30 to 1.73)<0.001
Acute appendicitis378 (0.28)336 (0.25)1.08 (0.93 to 1.25)0.298
Any follow-up healthcare encounter123,887 (91.55)126,370 (93.38)0.92 (0.91 to 0.93)<0.001
Subsequent VDD during follow-up19,578 (14.47)5,754 (4.25)3.62 (3.51 to 3.73)<0.001

Data are presented as number of events (%). Secondary hyperparathyroidism was used as a positive control outcome, whereas acute appendicitis was used as a negative control outcome. Follow-up healthcare encounters were assessed to examine potential surveillance bias, and subsequent VDD during follow-up was assessed to evaluate exposure durability. CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency.

3.4

Sensitivity and subgroup analyses

The primary association remained stable across all four sensitivity models, with HRs ranging from 1.29 to 1.42 (all p < 0.001). The association with mortality also persisted in models in which mortality could be assessed, except for Model I, in which mortality was not applicable because the analysis was restricted to patients who survived throughout the follow-up. Intractable epilepsy consistently showed the largest relative estimates across the sensitivity models (HR range, 1.62 to 1.76) (Table 4).

TABLE 4

Sensitivity analyses for the association between vitamin D deficiency and risks of epilepsy-related outcomes.

OutcomesModel IModel IIModel IIIModel IV
HR (95% CI)P-valueHR (95% CI)P-valueHR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.29 (1.17 to 1.41)<0.0011.35 (1.25 to 1.46)<0.0011.32 (1.22 to 1.43)<0.0011.42 (1.28 to 1.58)<0.001
Focal epilepsy1.24 (1.02 to 1.50)0.0271.38 (1.17 to 1.62)<0.0011.38 (1.17 to 1.63)<0.0011.50 (1.21 to 1.86)<0.001
Generalized epilepsy1.40 (1.05 to 1.85)0.0201.40 (1.10 to 1.78)0.0061.30 (1.03 to 1.65)0.0251.57 (1.15 to 2.15)0.004
Intractable epilepsy1.68 (1.11 to 2.55)0.0131.75 (1.22 to 2.51)0.0021.62 (1.13 to 2.32)0.0081.76 (1.13 to 2.74)0.011
Antiepileptics1.24 (1.21 to 1.26)<0.0011.25 (1.22 to 1.27)<0.0011.23 (1.21 to 1.25)<0.0011.18 (1.15 to 1.21)<0.001
MortalityNANA1.48 (1.44 to 1.52)<0.0011.48 (1.44 to 1.53)<0.0011.80 (1.74 to 1.87)<0.001

Model I was restricted to patients who survived throughout follow-up. Model II was restricted to patients with at least one recorded healthcare encounter during follow-up. Model III excluded patients with a previous history of hypoglycemia. Model IV excluded patients whose vitamin D status crossed the prespecified exposure threshold during follow-up, defined as 25-hydroxyvitamin D ≥ 20 ng/mL in the VDD group or <30 ng/mL in the control group. CI, confidence interval; HR, hazard ratio; NA, not applicable; VDD, vitamin D deficiency.

In age-stratified analyses, the association with the primary outcome was stronger among patients older than 65 years (HR, 1.44, p < 0.001) than among those aged 18 to 65 years (HR, 1.15, p = 0.039), with a significant interaction (p for interaction = 0.006) (Table 5). Significant interactions were also observed for focal epilepsy and antiepileptic drug use (p for interaction = 0.026 and <0.001, respectively), with stronger estimates in the older stratum. In sex-stratified analyses (Table 6), the estimate for the primary outcome was numerically higher in women (HR, 1.49, p < 0.001) than in men (HR, 1.20, p = 0.004), although the interaction for the primary outcome did not reach statistical significance (p for interaction = 0.084).

Significant interactions were observed for focal epilepsy and antiepileptic medication use (p for interaction = 0.006 for both), with stronger estimates in women.

TABLE 5

Age-stratified subgroup analyses for the association between vitamin D deficiency and risks of epilepsy-related outcomes.

Outcomes18 to 65 years>65 yearsp for
(n = 59,286 for each group)(n = 75,041 for each group)interaction
HR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.15 (1.01 to 1.31)0.0391.44 (1.31 to 1.59)<0.0010.006
Focal epilepsy1.05 (0.79 to 1.39)0.7601.54 (1.26 to 1.88)<0.0010.026
Generalized epilepsy1.08 (0.72 to 1.63)0.6951.57 (1.17 to 2.10)0.0030.140
Intractable epilepsy1.75 (1.02 to 3.02)0.0402.05 (1.26 to 3.32)0.0030.682
Antiepileptics1.18 (1.15 to 1.22)<0.0011.28 (1.25 to 1.31)<0.001<0.001
Mortality1.45 (1.34 to 1.57)<0.0011.46 (1.42 to 1.50)<0.0010.872

CI, confidence interval; HR, hazard ratio.

TABLE 6

Sex-stratified subgroup analyses for the association between vitamin D deficiency and risks of epilepsy-related outcomes.

OutcomesMaleFemaleP for interaction
(n = 54,116 for each group)(n = 80,855 for each group)
HR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.20 (1.06 to 1.37)0.0041.49 (1.34 to 1.64)<0.0010.084
Focal epilepsy1.06 (0.83 to 1.37)0.6321.71 (1.37 to 2.12)<0.0010.006
Generalized epilepsy1.25 (0.85 to 1.85)0.2571.44 (1.07 to 1.95)0.0170.576
Intractable epilepsy1.49 (0.76 to 2.91)0.2421.99 (1.29 to 3.05)0.0010.481
Antiepileptics1.20 (1.16 to 1.24)<0.0011.27 (1.24 to 1.30)<0.0010.006
Mortality1.42 (1.37 to 1.48)<0.0011.48 (1.43 to 1.54)<0.0010.131

CI, confidence interval; HR, hazard ratio.

3.5

Multivariable cox regression

Within the entire unmatched cohort (Table 7), the link between VDD and incident epilepsy or seizure persisted even after adjusting for demographic and clinical covariates concurrently (HR, 1.41, p < 0.001). The strongest covariate associations were cerebrovascular disease (2.61, p < 0.001) and alcohol-related disorders (HR, 2.26, p < 0.001), followed by a recorded glucose level <70 mg/dL (HR, 1.93, p < 0.001), chronic kidney disease (HR, 1.37, p < 0.001), nicotine dependence (HR, 1.31, p < 0.001), hemoglobin A1c ≥ 9% (HR, 1.16, p = 0.003), and ischemic heart disease (HR, 1.14, p = 0.008).

In contrast, disorders of lipoprotein metabolism (HR, 0.76, p < 0.001) and overweight or obesity (HR, 0.88, p = 0.002) were inversely associated with the outcome.

TABLE 7

Multivariable Cox regression model for incident epilepsy or seizure in the unmatched cohort.

VariableHR (95% CI)P-value
VDD vs. control group1.41 (1.31 to 1.51)<0.001
Male0.95 (0.88 to 1.02)0.145
Age at index1.01 (1.01 to 1.01)<0.001
White1.02 (0.95 to 1.10)0.594
Essential hypertension0.99 (0.91 to 1.08)0.788
Disorders of lipoprotein metabolism and other lipidemias0.76 (0.70 to 0.82)<0.001
Overweight and obesity0.88 (0.81 to 0.95)0.002
Chronic kidney disease1.37 (1.24 to 1.51)<0.001
Ischemic heart diseases1.14 (1.04 to 1.25)0.008
Nicotine dependence1.31 (1.18 to 1.47)<0.001
Cerebrovascular diseases2.61 (2.36 to 2.88)<0.001
Alcohol-related disorders2.26 (1.91 to 2.67)<0.001
Type 2 diabetes mellitus with hypoglycemia1.16 (0.90 to 1.48)0.258
Glucose < 70 mg/dL1.93 (1.73 to 2.14)<0.001
Hemoglobin A1c ≥ 9%1.16 (1.05 to 1.28)0.003
Diseases of liver1.07 (0.95 to 1.22)0.275

CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency.

3.6

Exposure-gradient analysis

Across vitamin D categories, a graded association was observed for the primary outcome of epilepsy or seizure, with progressively higher estimates from vitamin D insufficiency to VDD and severe VDD, with HRs of 1.23, 1.37, and 1.44, respectively (all p < 0.001) (Table 8). Similar graded patterns were observed for focal epilepsy (HRs 1.13, 1.40, and 1.63), intractable epilepsy (HRs 1.85, 1.92, and 2.38), antiepileptic medication use (HRs 1.18, 1.25, and 1.34), and mortality (HRs 1.19, 1.47, and 1.67).

In contrast, the gradient was less consistent for generalized epilepsy, for which the estimates of vitamin D insufficiency and VDD were similar. Overall, these exploratory findings suggest a graded association with most epilepsy-related outcomes, except generalized epilepsy.

TABLE 8

Exposure-gradient analysis comparing severe vitamin D deficiency, vitamin D deficiency, and vitamin D insufficiency with normal vitamin D status.

OutcomesSevere VDD
(n = 41,597 for each group)
VDD (primary analysis)
(n = 135,329 for each group)
VDI
(n = 185,674 for each group)
HR (95% CI)P-valueHR (95% CI)P-valueHR (95% CI)P-value
Epilepsy or seizure1.44 (1.27 to 1.64)<0.0011.37 (1.26 to 1.48)<0.0011.23 (1.15 to 1.32)<0.001
Focal epilepsy1.63 (1.25 to 2.13)<0.0011.40 (1.19 to 1.65)<0.0011.13 (0.98 to 1.31)0.087
Generalized epilepsy1.63 (1.14 to 2.33)0.0061.42 (1.13 to 1.80)0.0031.42 (1.15 to 1.76)0.001
Intractable epilepsy2.38 (1.36 to 4.18)0.0021.92 (1.33 to 2.76)<0.0011.85 (1.33 to 2.58)<0.001
Antiepileptics1.34 (1.30 to 1.39)<0.0011.25 (1.23 to 1.27)<0.0011.18 (1.16 to 1.20)<0.001
Mortality1.67 (1.59 to 1.75)<0.0011.47 (1.43 to 1.51)<0.0011.19 (1.16 to 1.22)<0.001

Severe VDD was defined as 25-hydroxyvitamin D < 10 ng/mL, VDD as <20 ng/mL, vitamin D insufficiency as 20 to 29.9 ng/mL, and normal vitamin D status as ≥30 ng/mL. These analyses were exploratory, and no formal trend test was performed. CI, confidence interval; HR, hazard ratio; VDD, vitamin D deficiency; VDI, vitamin D insufficiency.

4

Discussion

In this large multinational propensity score: matched cohort of adults with T2DM, VDD was associated with a higher long-term risk of incident epilepsy or seizure. The association was observed across epilepsy subtypes and was most pronounced for intractable epilepsy, a clinically severe phenotype. The primary association remained robust across sensitivity analyses addressing differential mortality, follow-up ascertainment, prior hypoglycemia, and time-varying vitamin D status. Most epilepsy-related outcomes also showed progressively higher risk estimates across lower vitamin D categories. The prespecified positive and negative control outcomes behaved as expected.

In addition, the primary association remained consistent in the sensitivity analysis restricted to patients with at least one recorded follow-up encounter. However, despite the statistically significant relative association, the absolute incidence difference was small (1.10% vs. 0.78%; absolute difference, 0.32 percentage points). Accordingly, the clinical relevance of this finding should be interpreted cautiously, and VDD should be regarded primarily as a potential risk marker rather than an indicator of a large absolute increase in seizure risk.

These findings extend the prior literature, which has primarily focused on the reverse direction of association between epilepsy and vitamin D status. Previous studies have frequently reported a high prevalence of VDD among patients with established epilepsy, often attributed to long-term antiseizure medication use, reduced mobility, and limited sunlight exposure (18Not reported20). However, these cross-sectional or treatment-focused studies cannot establish whether low vitamin D status temporally precedes the development of incident epilepsy or seizure. By excluding patients with pre-existing epilepsy or antiseizure medication use and applying a 1-year landmark design, the present study specifically evaluated the temporal relationship between antecedent VDD and subsequent incident epilepsy or seizure in adults with T2DM, a population in which both VDD and seizure-related risk factors are common.

The multivariable Cox analysis supported the internal coherence of the findings by reproducing associations with established seizure-related risk factors. Consistent with the established epidemiology of seizure-related outcomes in diabetes and older adults, cerebrovascular disease, recorded glucose <70 mg/dL, and older age were independently associated with incident epilepsy or seizure (5, 12, 28). These findings are clinically plausible because cerebrovascular injury and hypoglycemia are well-recognized seizure precipitants, particularly in patients with metabolic vulnerability. Interestingly, disorders of lipoprotein metabolism and being overweight or obese were inversely associated with incident epilepsy or seizure in our unmatched multivariable model.

A similar pattern has been reported previously; in a study of older veterans, Pugh et al. (28) similarly reported that hypercholesterolemia and obesity were associated with a lower likelihood of new-onset epilepsy, whereas cerebrovascular disease was strongly associated with an increased risk. Therefore, the inverse associations observed in our study should be interpreted cautiously rather than as evidence of a protective biological effect. Potential explanations include residual confounding, differences in treatment patterns such as statin use, healthcare behavior, diagnostic coding, survival or competing risk mechanisms, and collider bias.

Overall, the multivariable findings support the coherence of the VDD: epilepsy association with recognized seizure-related risk factors while also highlighting the complexity of interpreting metabolic covariates in observational EHR-based research.

Several hypothesized mechanisms may provide biological plausibility for the observed association, as vitamin D signaling has been implicated in neuronal calcium regulation, neurotrophin expression, oxidative stress, and inflammatory pathways that may be relevant to neuronal excitability (29Not reported31). In patients with T2DM, these mechanisms could interact with pre-existing metabolic, vascular, and inflammatory vulnerability; however, these pathways were not directly evaluated in the present study and remain speculative. The exposure-gradient findings provided additional supportive evidence but should be interpreted as exploratory because no formal trend test was performed.

Most epilepsy-related outcomes, including the primary outcome, focal epilepsy, intractable epilepsy, and antiepileptic medication use, showed progressively higher estimates from vitamin D insufficiency to VDD and severe VDD. However, this pattern was not fully consistent for generalized epilepsy, and the analysis should be interpreted with caution. Because the TriNetX platform does not support patient-level continuous exposure modeling or formal trend testing, we could not perform a continuous dose-response analysis or formally test linearity or nonlinearity. Therefore, the observed pattern should be regarded strictly as hypothesis-generating and should not be interpreted as evidence of a statistically confirmed dose-response relationship.

The apparent discrepancy between our findings and those of Mendelian randomization studies warrants careful interpretation. Genetic studies have generally reported null or inconsistent associations between genetically predicted 25(OH)D levels and epilepsy risk (21Not reported23), suggesting that the direct lifelong causal effect of vitamin D on epilepsy may be limited or difficult to detect. However, Mendelian randomization and real-world cohort studies address different research questions. Genetically predicted 25(OH)D in Mendelian randomization studies represents lifelong genetic liability to circulating 25(OH)D levels, whereas clinically measured VDD may reflect an acquired and dynamic risk state influenced by sunlight exposure, nutrition, adiposity, inflammation, renal dysfunction, metabolic control, and comorbidity burden.

Therefore, null or inconsistent genetic evidence does not necessarily exclude a clinically relevant association between VDD and subsequent epilepsy or seizure in patients with T2DM. The contribution of the present study is to evaluate this clinically relevant temporal relationship in a large T2DM population, rather than to establish causality. This study provides real-world evidence that VDD may serve as a risk marker for subsequent epilepsy or seizure in patients with T2DM. These findings should be interpreted as hypothesis-generating and complementary to genetic evidence, not as proof that vitamin D supplementation prevents epilepsy.

From a clinical perspective, serum 25(OH)D testing is widely available, and vitamin D status is routinely measurable and potentially modifiable in patients with T2DM. Although the economic burden of testing and treatment varies across countries and healthcare systems, serum 25(OH)D measurement is generally minimally invasive and clinically accessible. However, the present findings should not be interpreted as evidence that vitamin D supplementation prevents epilepsy or seizure. Rather, clinically measured VDD may help identify patients with a higher burden of metabolic, vascular, inflammatory, or nutritional vulnerability who may warrant closer clinical attention to potential neurological complications.

Clinical trials in patients with established epilepsy have begun to examine whether correction of VDD can improve seizure-related outcomes, but the findings remain preliminary and have not established a preventive effect in individuals without epilepsy (32, 33). Future prospective studies should determine whether targeted or periodic vitamin D screening improves risk identification, whether correction of VDD modifies seizure-related outcomes, and whether such strategies are clinically effective and cost-effective. These studies should also establish the appropriate screening interval and identify subgroups, such as older adults or patients with severe or persistent VDD, who may derive the greatest benefit.

Until such evidence is available, universal annual vitamin D screening solely for epilepsy prevention cannot be recommended.

Several limitations should be considered. First, residual confounding is unavoidable in observational EHR studies because several potentially relevant factors were unavailable, including sunlight exposure, seasonality, dietary habits, physical activity, socioeconomic status, vitamin D supplementation and adherence to supplementation, diabetes duration and severity, and adherence to other medications. Poorer lifestyle, socioeconomic, or diabetes-related profiles in the VDD cohort could have exaggerated the observed association, whereas supplementation or favorable behavioral changes after baseline could have attenuated it. Therefore, the direction and magnitude of the remaining residual confounding are uncertain.

Second, exposure misclassification may have occurred because vitamin D status was based on the first qualifying 25(OH)D measurement and could subsequently have changed owing to supplementation, seasonal variation, or lifestyle changes. The 5-year look-back classification, assessment of exposure durability during follow-up, and sensitivity analysis excluding patients whose vitamin D status crossed the predefined threshold partially mitigated this concern but could not replace a formal repeated-measure analysis. Information on vitamin D replacement therapy, including dose, duration, adherence, and over-the-counter supplementation, was also unavailable; treatment during follow-up may therefore have attenuated or otherwise modified the observed associations.

Third, outcome misclassification is possible because epilepsy, seizure, and epilepsy subtypes were identified using ICD-10-CM codes without confirmation by EEG findings, neurologist assessment, neuroimaging, or chart review. Although previous validation studies (34, 35) have shown generally acceptable accuracy for identifying epilepsy from administrative data, diagnostic performance varies across healthcare settings and may be less consistent for specific epilepsy subtypes. Moreover, we could not perform validation specifically within TriNetX. Therefore, some outcome misclassification remains possible, and its direction and magnitude cannot be determined.

Fourth, selection bias may arise because eligibility required a documented 25(OH)D measurement. Tested patients may have greater comorbidity burden or healthcare utilization than the broader T2DM population, and propensity score matching could not account for unmeasured determinants of testing. Therefore, the findings are most applicable to patients with T2DM who undergo vitamin D testing. Fifth, unexpected inverse associations between dyslipidemia and obesity suggest possible residual confounding, collider bias, or competing risk mechanisms. Sixth, mortality was higher in the VDD cohort and may have competed with the occurrence or ascertainment of epilepsy or seizure.

Because the cause-specific Cox model does not directly estimate cumulative incidence in the presence of competing mortality, the reported HRs should be interpreted accordingly. Although the survivor-restricted sensitivity analysis yielded consistent findings, it could not fully substitute for a formal competing-risk analysis. Finally, subgroup, sensitivity, and exposure-gradient analyses were exploratory and uncorrected for multiplicity, increasing the possibility of chance findings. Moreover, the absence of a formal trend test limits interpretation of the exposure-gradient results as evidence of a dose-response relationship.

The generalizability of these findings is limited because the study included only adults with T2DM who had documented 25(OH)D measurements. The results may therefore not apply to individuals without diabetes, pediatric populations, or patients with T2DM who do not undergo vitamin D testing.

5

Conclusion

Among adults with T2DM, clinically measured VDD was associated with a higher long-term risk of incident epilepsy or seizure. The strongest relative estimate was observed for intractable epilepsy, and risk estimates generally increased across progressively lower vitamin D categories. These findings suggest that VDD may serve as a clinically relevant risk marker in this population, but they do not establish a causal relationship or demonstrate that vitamin D supplementation can prevent epilepsy or seizure.

Edited by: Haoqiang Zhang, University of Science and Technology of China, China

Reviewed by: Thomas Chandy Varkey, Banner Health, United States

Mohammadrasool Ghasemianrad, Kermanshah University of Medical Sciences, Iran

Data availability statement

The datasets presented in this article are not readily available because the datasets used in this study were obtained from the TriNetX Global Collaborative Network. Due to data use agreements, privacy protections, and licensing restrictions, the underlying patient-level data cannot be shared by the corresponding author. Access to the data is restricted to authorized users through the TriNetX platform. The study used de-identified electronic health record data, and only aggregated results generated from the platform are reported in the manuscript.

Requests to access the datasets should be directed to https://live.trinetx.com.

Ethics statement

The studies involving humans were approved by Institutional Review Board of Chi Mei Medical Center. The studies were conducted in accordance with the local legislation and institutional requirements. The ethics committee/institutional review board waived the requirement of written informed consent for participation from the participants or the participants’ legal guardians/next of kin because this study used only de-identified electronic health record data obtained from the TriNetX network.

Author contributions

MY: Conceptualization, Data curation, Formal analysis, Investigation, Methodology, Software, Supervision, Validation, Visualization, Writing: original draft, Writing: review & editing. P-HL: Conceptualization, Formal analysis, Investigation, Methodology, Project administration, Validation, Writing: original draft, Writing: review & editing. P-HF: Conceptualization, Data curation, Formal analysis, Investigation, Methodology, Project administration, Software, Supervision, Validation, Visualization, Writing: original draft, Writing: review & editing.

Conflict of interest

The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declared that Generative AI was used in the creation of this manuscript. Generative AI was used to assist with language editing, manuscript polishing, and improvement of clarity and readability. The authors critically reviewed, revised, and approved all AI-assisted content. Generative AI was not used to generate original study data, perform statistical analyses, interpret results independently, or make scientific conclusions. The authors take full responsibility for the accuracy, integrity, and final content of the manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

Supplementary material

The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fnut.2026.1910295/full#supplementary-material

Supplement file at the original source: open the original paper. This file is not included in this text import.

References

1. Khan MAB Hashim MJ King JK Govender RD Mustafa H Al Kaabi J . Epidemiology of type 2 diabetes: global burden of disease and forecasted trends. J Epidemiol Glob Health. (2020 ) 10 :107Not reported11 . 10.2991/jegh.k.191028.001 32175717 PMC7310804
2. Singh A Shadangi S Gupta PK Rana S . Type 2 diabetes mellitus: a comprehensive review of pathophysiology, comorbidities, and emerging therapies. Compr Physiol. (2025 ) 15 :e70003 . 10.1002/cph4.70003 39980164
3. Sutherland GT Chen A Nguyen-Hao HT Mundell H Aladyeva E Hofer MJ et al . How does type 2 diabetes modify the risk of Alzheimer’s disease? Alzheimers Dement. (2026 ) 22 :e71471 . 10.1002/alz.71471 42151730 PMC13183603
4. Park S Kang HJ Jeon JH Kim MJ Lee IK . Recent advances in the pathogenesis of microvascular complications in diabetes. Arch Pharm Res. (2019 ) 42 :252Not reported62 . 10.1007/s12272-019-01130-3 30771210
5. Lu CL Chang YH Sun Y Li CY . A population-based study of epilepsy incidence in association with type 2 diabetes and severe hypoglycaemia. Diabetes Res Clin Pract. (2018 ) 140 :97Not reported106 . 10.1016/j.diabres.2018.03.020 29608979
6. Zhu M Ling S . Potential causal association of diabetes mellitus and blood glucose related indexes with the onset of epilepsy: a two-sample Mendelian randomization study. Front Neurol. (2024 ) 15 :1399504 . 10.3389/fneur.2024.1399504 38962478 PMC11221190
7. Phoswa WN Mokgalaboni K . Immunological imbalances associated with epileptic seizures in type 2 diabetes mellitus. Brain Sci. (2023 ) 13 :732 . 10.3390/brainsci13050732 37239204 PMC10216299
8. Shlobin NA Sander JW . Drivers for the comorbidity of type 2 diabetes mellitus and epilepsy: a scoping review. Epilepsy Behav. (2020 ) 106 :107043 . 10.1016/j.yebeh.2020.107043 32217418
9. Ramos-Riera KP Pérez-Severiano F López-Meraz ML . Oxidative stress: a common imbalance in diabetes and epilepsy. Metab Brain Dis. (2023 ) 38 :767Not reported82 . 10.1007/s11011-022-01154-7 36598703
10. Faselis C Katsimardou A Imprialos K Deligkaris P Kallistratos M Dimitriadis K . Microvascular complications of type 2 diabetes mellitus. Curr Vasc Pharmacol. (2020 ) 18 :117Not reported24 . 10.2174/1570161117666190502103733 31057114
11. Yun C Xuefeng W . Association between seizures and diabetes mellitus: a comprehensive review of literature. Curr Diabetes Rev. (2013 ) 9 :350Not reported4 . 10.2174/15733998113099990060 23590576
12. Baviera M Roncaglioni MC Tettamanti M Vannini T Fortino I Bortolotti A et al . Diabetes mellitus: a risk factor for seizures in the elderly-a population-based study. Acta Diabetol. (2017 ) 54 :863Not reported70 . 10.1007/s00592-017-1011-0 28631057
13. Taderegew MM Woldeamanuel GG Wondie A Getawey A Abegaz AN Adane F . Vitamin D deficiency and its associated factors among patients with type 2 diabetes mellitus: a systematic review and meta-analysis. BMJ Open. (2023 ) 13 :e075607 . 10.1136/bmjopen-2023-075607 37798019 PMC10565281
14. Fuentes-Barría H Aguilera-Eguía R Flores-Fernández C Angarita-Davila L Rojas-Gómez D Alarcón-Rivera M et al . Vitamin D and type 2 diabetes mellitus: molecular mechanisms and clinical implications-a narrative review. Int J Mol Sci. (2025 ) 26 :2153 . 10.3390/ijms26052153 40076782 PMC11900948
15. Mirza I Mohamed A Deen H Balaji S Elsabbahi D Munasser A et al . Obesity-associated vitamin D deficiency correlates with adipose tissue DNA hypomethylation, inflammation, and vascular dysfunction. Int J Mol Sci. (2022 ) 23 :14377 . 10.3390/ijms232214377 36430854 PMC9694734
16. Guo HL Sun XL Xu YY Zhang YY Wang J Fan L et al . An elusive causal link between epilepsy and vitamin D in children: more questions than answers? A narrative review. Neurobiol Dis. (2025 ) 213 :107022 . 10.1016/j.nbd.2025.107022 40623480
17. Kouba BR Rodrigues ALS . Neuroplasticity-related effects of vitamin D relevant to its neuroprotective effects: a narrative review. Pharmacol Biochem Behav. (2024 ) 245 :173899 . 10.1016/j.pbb.2024.173899 39447683
18. Teagarden DL Meador KJ Loring DW . Low vitamin D levels are common in patients with epilepsy. Epilepsy Res. (2014 ) 108 :1352Not reported6 . 10.1016/j.eplepsyres.2014.06.008 25060996 PMC4149948
19. Dong N Guo HL Hu YH Yang J Xu M Ding L et al . Association between serum vitamin D status and the anti-seizure treatment in Chinese children with epilepsy. Front Nutr. (2022 ) 9 :968868 . 10.3389/fnut.2022.968868 36105574 PMC9464910
20. Liu Y Gong C Li J Ning X Zeng P Wang L et al . Vitamin D content and prevalence of vitamin D deficiency in patients with epilepsy: a systematic review and meta-analysis. Front Nutr. (2024 ) 11 :1439279 . 10.3389/fnut.2024.1439279 39279896 PMC11392846
21. Luo X Ruan Z Liu L . The causal effect of serum 25-hydroxyvitamin D levels on epilepsy: a two-sample Mendelian randomization study. Epilepsia Open. (2023 ) 8 :912Not reported7 . 10.1002/epi4.12758 37158995 PMC10472413
22. Chen H Zheng Z Cai X Gao F . Causal links between serum micronutrients and epilepsy: a Mendelian randomization analysis. Front Neurol. (2024 ) 15 :1419289 . 10.3389/fneur.2024.1419289 39076846 PMC11284170
23. Wu Z Zhao Y Zhang B Li Y . Causal association between serum 25-hydroxyvitamin D levels and epilepsy: a two-sample bidirectional mendelian randomization study. Epilepsy Behav. (2025 ) 164 :110253 . 10.1016/j.yebeh.2024.110253 39823739
24. Hung KC Yu TS Lai YC Hsu CW Yew M Yu CH et al . Vitamin D deficiency and subsequent risk of obstructive sleep apnea: a multi-institutional retrospective study. Front Nutr. (2025 ) 12 :1651712 . 10.3389/fnut.2025.1651712 41311801 PMC12648596
25. Hung KC Weng HL Hsu CW Lai YC Chen IW . Association between iron deficiency anemia and risk of venous thromboembolism: a multi-institutional retrospective study. Front Nutr. (2025 ) 12 :1660622 . 10.3389/fnut.2025.1660622 41190143 PMC12580108
26. Hung KC Yu TS Liao SW Lai YC Fu PH Feng PH et al . Preoperative vitamin D deficiency and postoperative delirium risk: multicenter retrospective study. Front Nutr. (2025 ) 12 :1617670 . 10.3389/fnut.2025.1617670 40747334 PMC12310456
27. Chen IW Wang WT Lai YC Chang YJ Lin YT Hung KC . Association between vitamin D deficiency and major depression in patients with chronic kidney disease: a cohort study. Front Nutr. (2025 ) 12 :1540633 . 10.3389/fnut.2025.1540633 39931371 PMC11807813
28. Pugh MJ Knoefel JE Mortensen EM Amuan ME Berlowitz DR Van Cott AC . New-onset epilepsy risk factors in older veterans. J Am Geriatr Soc. (2009 ) 57 :237Not reported42 . 10.1111/j.1532-5415.2008.02124.x 19207140
29. Pendo K DeGiorgio CM . Vitamin D3 for the treatment of epilepsy: basic mechanisms, animal models, and clinical trials. Front Neurol. (2016 ) 7 :218 . 10.3389/fneur.2016.00218 28008324 PMC5143473
30. Cui X Eyles DW . Vitamin D and the central nervous system: causative and preventative mechanisms in brain disorders. Nutrients. (2022 ) 14 :4353 . 10.3390/nu14204353 36297037 PMC9610817
31. Parsons ALM Bucknor EMV Castroflorio E Soares TR Oliver PL Rial D . The interconnected mechanisms of oxidative stress and neuroinflammation in epilepsy. Antioxidants (Basel). (2022 ) 11 :157 . 10.3390/antiox11010157 35052661 PMC8772850
32. Chassoux F Navarro V Quirins M Laurent A Gavaret M Cousyn L et al . Vitamin D deficiency and effect of treatment on seizure frequency and quality of life parameters in patients with drug-resistant epilepsy: a randomized clinical trial. Epilepsia. (2024 ) 65 :2612Not reported25 . 10.1111/epi.18050 38980968
33. Pattnaik SS Sarangi SC Dash Y Singh A Goswami R Singh S et al . Role of vitamin D supplementation and vitamin D receptor in drug-resistant epilepsy: a double-blind placebo-controlled trial conducted in India. Epilepsia. (2025 ) 66 :3716Not reported29 . 10.1111/epi.18492 40516032
34. Smith JR Jones FJS Fureman BE Buchhalter JR Herman ST Ayub N et al . Accuracy of ICD-10-CM claims-based definitions for epilepsy and seizure type. Epilepsy Res. (2020 ) 166 :106414 . 10.1016/j.eplepsyres.2020.106414 32683225 PMC7797939
35. Mbizvo GK Bennett KH Schnier C Simpson CR Duncan SE Chin RFM . The accuracy of using administrative healthcare data to identify epilepsy cases: a systematic review of validation studies. Epilepsia. (2020 ) 61 :1319Not reported35 . 10.1111/epi.16547 32474909
Publication and source details

Original title: Vitamin D deficiency and long-term risk of epilepsy or seizure in type 2 diabetes: a multicenter real-world cohort study

Ming Yew; Ping-Hsin Liu; Ping-Hsun Feng

Frontiers in Nutrition · 2026

* Correspondence: Ping-Hsun Feng, fengbenson@gmail.comCopyright © 2026 Yew, Liu and Feng.2026Yew, Liu and Fenghttps://creativecommons.org/licenses/by/4.0/This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.The author(s) declared that financial support was not received for this work and/or its publication.

Repository JATS snapshot; version as supplied

Source retrieved: 2026-11-08T17:27:59+00:00

DOI: 10.3389/fnut.2026.1910295 · PMC13495779