Variability in metabolic parameters and risk of dementia: a nationwide population-based study