Accelerated brain ageing in migraine: a multilevel MRI-based brain-age modelling study.
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 255 lines · 6.9 KB · GPL-3.0
- function varargout = permcca(varargin)
- % Permutation inference for canonical correlation
- % analysis (CCA).
- %
- % Usage:
- % [pfwer,r,A,B,U,V] = permcca(Y,X,nP,Z,W,Sel,partial,Pset)
- %
- % Inputs:
- % - Y : Left set of variables, size N by P.
- % - X : Right set of variables, size N by Q.
- % - nP : An integer representing the number
- % of permutations.
- % Default is 1000 permutations.
- % - Z : (Optional) Nuisance variables for
- % both (partial CCA) or left side
- % (part CCA) only.
- % - W : (Optional) Nuisance variables for the
- % right side only (bipartial CCA).
- % - Sel : (Optional) Selection matrix or a selection vector,
- % to use Theil's residuals instead of Huh-Jhun's
- % projection. If specified as a vector, it can be
- % made of integer indices or logicals.
- % The R unselected rows of Z (S of W) must be full
- % rank. Use -1 to randomly select N-R (or N-S) rows.
- % - partial : (Optional) Boolean indicating whether
- % this is partial (true) or part (false) CCA.
- % Default is true, i.e., partial CCA.
- % - Pset : Predefined set of permutations (e.g., that respect
- % exchangeability blocks). For information on how to
- % generate these, see:
- % https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM
- % If a selection matrix is provided (for the Theil method),
- % Pset will have to have fewer rows than the original N, i.e.,
- % it will have as many rows as the effective number of
- % subjects determined by the selection matrix.
- %
- % Outputs:
- % - p : p-values, FWER corrected via closure.
- % - r : Canonical correlations.
- % - A : Canonical coefficients, left side.
- % - B : Canonical coefficients, right side.
- % - U : Canonical variables, left side.
- % - V : Canonical variables, right side.
- %
- % ___________________________________________
- % AM Winkler, O Renaud, SM Smith, TE Nichols
- % NIH - Univ. of Geneva - Univ. of Oxford
- % Mar/2020 (first version)
- % Apr/2021 (this version)
- % Read input arguments
- narginchk(2,8)
- Y = varargin{1};
- X = varargin{2};
- if nargin >= 3
- nP = varargin{3};
- end
- if nargin >= 4
- Z = varargin{4};
- else
- Z = [];
- end
- if nargin >= 5
- W = varargin{5};
- else
- W = [];
- end
- if nargin >= 6
- Sel = varargin{6};
- else
- Sel = [];
- end
- if nargin >= 7
- partial = varargin{7};
- else
- partial = true;
- end
- if nargin >= 8
- Pset = varargin{8};
- else
- Pset = false;
- end
- Ny = size(Y,1);
- Nx = size(X,1);
- if Ny ~= Nx
- error('Y and X do not have same number of rows.')
- end
- N = Ny; clear Ny Nx
- I = eye(N);
- % Residualise Y wrt Z
- if isempty(Z)
- Qz = I;
- else
- Z = center(Z);
- Qz = semiortho(Z,Sel);
- end
- Y = center(Y);
- Y = Qz'*Y;
- Ny = size(Y,1);
- R = size(Z,2);
- % Residualise X wrt W
- if isempty(W)
- if partial
- W = Z;
- Qw = Qz;
- else
- Qw = I;
- end
- else
- W = center(W);
- Qw = semiortho(W,Sel);
- end
- X = center(X);
- X = Qw'*X;
- Nx = size(X,1);
- S = size(W,2);
- % Initial CCA
- [A,B,r] = cca(Qz*Y,Qw*X,R,S);
- K = numel(r);
- U = Y*[A null(A')];
- V = X*[B null(B')];
- % Initialise counter
- cnt = zeros(1,K);
- lW = zeros(1,K);
- % For each permutation
- for p = 1:nP
- fprintf('Permutation %d/%d: ',p,nP);
- % If user didn't supply a set of permutations,
- % permute randomly both Y and X.
- % Otherwise, use the permtuation set to shuffle
- % one side only.
- if islogical(Pset)
- % First permutation is no permutation
- if p == 1
- idxY = (1:Ny);
- idxX = (1:Nx);
- else
- idxY = randperm(Ny);
- idxX = randperm(Nx);
- end
- else
- idxY = Pset(:,p);
- idxX = (1:Nx);
- end
- % For each canonical variable
- for k = 1:K
- fprintf('%d ',k);
- [~,~,rperm] = cca(Qz*U(idxY,k:end),Qw*V(idxX,k:end),R,S);
- lWtmp = -fliplr(cumsum(fliplr(log(1-rperm.^2))));
- lW(k) = lWtmp(1);
- end
- if p == 1
- lW1 = lW;
- end
- cnt = cnt + (lW >= lW1);
- fprintf('\n');
- end
- punc = cnt/nP;
- varargout{1} = cummax(punc); % pfwer
- varargout{2} = r; % canonical correlations
- varargout{3} = A; % canonical weights (left)
- varargout{4} = B; % canonical weights (right)
- varargout{5} = Qz*Y*A; % canonical variables (left)
- varargout{6} = Qw*X*B; % canonical variables (right)
- % =================================================================
- function Q = semiortho(Z,Sel)
- % Compute a semi-orthogonal matrix according to
- % the Huh-Jhun or Theil methods. Note that, due to a
- % simplification of HJ, input here is Z, not Rz.
- if isempty(Sel)
- % If Sel is empty, do Huh-Jhun
- % HJ here is simplified as in Winkler et al, 2020 (see the Appendix text of the paper)
- [Q,D,~] = svd(null(Z'),'econ');
- Q = Q*D;
- else
- % Theil
- [N,R] = size(Z);
- if isvector(Sel)
- % If Sel is a vector of logical or integer indices
- if islogical(Sel)
- Sel = find(Sel);
- end
- if Sel(1) > 0
- % If Sel is a column of indices
- unSel = setdiff(1:N,Sel);
- if rank(Z(unSel,:)) < R
- error('Selected rows of nuisance not full rank')
- end
- else
- % If Sel is -1 or anything else but empty [].
- % First confirm that this is even possible
- rZ = rank(Z);
- if rZ < R
- error('Impossible to use the Theil method with this set of nuisance variables')
- end
- % Find unique rows; since unique sorts outputs, shuffle to avoid trends
- [~,iU,~] = unique(Z,'rows');
- pidx = randperm(numel(iU));
- iU = iU(pidx);
- % Go by trial and error
- unSel0 = [];
- rnk0 = 0;
- for u = iU'
- unSel = [unSel0 u];
- Zout = Z(unSel,:);
- rnk = rank(Zout);
- if rnk > rnk0
- unSel0 = unSel;
- rnk0 = rnk;
- end
- if rnk == R
- break
- end
- end
- Sel = setdiff((1:N),unSel);
- end
- S = eye(N);
- S = S(:,Sel);
- else
- % Sel is a matrix proper
- S = Sel;
- end
- Rz = eye(N) - Z*pinv(Z);
- Q = Rz*S*sqrtm(inv(S'*Rz*S));
- end
- % =================================================================
- function [A,B,cc] = cca(Y,X,R,S)
- % Compute CCA.
- N = size(Y,1);
- [Qy,Ry,iY] = qr(Y,0);
- [Qx,Rx,iX] = qr(X,0);
- K = min(rank(Y),rank(X));
- [L,D,M] = svds(Qy'*Qx,K);
- cc = min(max(diag(D(:,1:K))',0),1);
- A = Ry\L(:,1:K)*sqrt(N-R);
- B = Rx\M(:,1:K)*sqrt(N-S);
- A(iY,:) = A;
- B(iX,:) = B;
- % =================================================================
- function X = center(X)
- % Mean center a matrix and remove constant columns.
- icte = sum(diff(X,1,1).^2,1) == 0;
- X = bsxfun(@minus,X,mean(X,1));
- X(:,icte) = [];
permcca.m at commit 5046146, under GPL-3.0 · at the source
Overview
- Department of Neurology, Neurological Institute, Taipei Veterans General Hospital, Taipei 112201, Taiwan
- School of Medicine, National Yang Ming Chiao Tung University, Taipei 112304, Taiwan
- Institute of Neuroscience, National Yang Ming Chiao Tung University, Taipei 112304, Taiwan
- Center for Healthy Longevity and Aging Sciences, National Yang Ming Chiao Tung University, Taipei 112304, Taiwan
- Department of Neurology, Columbia University, New York 10032, USA
- Department of Neurology, Keelung Hospital, Ministry of Health and Welfare, Keelung 20148, Taiwan
- Brain Research Center, National Yang Ming Chiao Tung University, Taipei 112304, Taiwan
- Division of Translational Research, Department of Medical Research, Taipei Veterans General Hospital, Taipei 112201, Taiwan
- Department of Education and Research, Taipei City Hospital, Taipei 24213, Taiwan
Abstract
Migraine is increasingly recognized as more than just an episodic headache disorder—it often carries a profound burden marked by emotional and cognitive disturbances. Recent insights point towards a possible link between migraine and accelerated brain ageing, yet the specific brain regions affected and the clinical implications remain poorly understood. We investigated grey matter-based brain age using voxel-based morphometry in 110 preventive treatment–naïve patients with migraine and 70 healthy controls, based on T1-weighted MRI and a validated brain-age prediction framework trained on data from 1318 healthy individuals. Compared with controls, patients with migraine exhibited a significantly higher global brain-age gap [mean difference = 4.24 years; confidence interval (CI, 0.12, 8.36); P = 0.039; ηp² = 0.024]. Regionally, 66 out of 442 brain parcels—primarily within the prefrontal, frontal, cingulate, parietal and temporal cortices and the amygdala—showed elevated ageing patterns. Permutation-based canonical correlation analysis revealed a stable multivariate association between regional brain-age deviations and a combination of migraine-related clinical factors (headache frequency, painkiller usage and depressive symptoms), although individual factor contributions were variable. Functional annotation of the affected regions highlighted their roles in cognitive, emotional and perceptual processing. Together, these findings reveal that migraine is linked to widespread, regionally patterned brain ageing, mirroring the clinical and neurobiological complexity of the disease. This work not only deepens our understanding of migraine’s impact on the brain but also opens new avenues for exploring how timely intervention might protect brain health in this population.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above.
andersonwinkler/PermCCA
5046146c4882a68896cac95f92132e62c5628669, 21 August 2024Availability: 2 checks, the latest on 30 October 2026: the link answers
- 30 October 2026: the link answers
- 30 September 2026: the link answers
9 files
- permcca.m, MATLAB, 255 lines
- permloads.m, MATLAB, 285 lines
- testing/
ccainf.m , MATLAB, 442 lines - testing/
epca.m , MATLAB, 118 lines - testing/
sometest.m , MATLAB, 20 lines - testing/
test_permcca.m , MATLAB, 20 lines - testing/
testloads.m , MATLAB, 24 lines - LICENSE, License, 674 lines
- README.md, Text, 8 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 7 scripts, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
The data that support the findings of this study are available from the corresponding author upon reasonable request. The analyses in this study were performed using a combination of commercial and open-source software: commercial software, MATLAB (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 10 authors, 4 keywords, 1 funder, 38 references.
Cite
This paper
Liu, H.-Y., Kuo, C.-Y., Lee, P.-L., Liu, Y.-H., Chen, W.-T., Chen, S.-P., Wang, Y.-F., Lin, C.-P., Chou, K.-H., & Wang, S.-J. (2026). Accelerated brain ageing in migraine: a multilevel MRI-based brain-age modelling study. Brain communications, 8(2), fcag110. https://
BibTeX
@article{liu2026accelera
author = {Liu, Hung-Yu and Kuo, Chen-Yuan and Lee, Pei-Lin and Liu, Yi-Hsuan and Chen, Wei-Ta and Chen, Shih-Pin and Wang, Yen-Feng and Lin, Ching-Po and Chou, Kun-Hsien and Wang, Shuu-Jiun},
title = {{Accelerated brain ageing in migraine: a multilevel MRI-based brain-age modelling study}},
journal = {Brain communications},
year = {2026},
month = mar,
volume = {8},
number = {2},
pages = {fcag110},
publisher = {Oxford University Press},
issn = {2632-1297},
doi = {10.1093/
url = {https://
pmid = {41958921},
pmcid = {PMC13056717}
}
RIS
TY - JOUR
AU - Liu, Hung-Yu
AU - Kuo, Chen-Yuan
AU - Lee, Pei-Lin
AU - Liu, Yi-Hsuan
AU - Chen, Wei-Ta
AU - Chen, Shih-Pin
AU - Wang, Yen-Feng
AU - Lin, Ching-Po
AU - Chou, Kun-Hsien
AU - Wang, Shuu-Jiun
TI - Accelerated brain ageing in migraine: a multilevel MRI-based brain-age modelling study
T2 - Brain communications
J2 - Brain Commun
PY - 2026
DA - 2026/
VL - 8
IS - 2
SP - fcag110
SN - 2632-1297
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "Accelerated brain ageing in migraine: a multilevel MRI-based brain-age modelling study",
"container-title": "Brain communications",
"author": [
{
"family": "Liu",
"given": "Hung-Yu"
},
{
"family": "Kuo",
"given": "Chen-Yuan"
},
{
"family": "Lee",
"given": "Pei-Lin"
},
{
"family": "Liu",
"given": "Yi-Hsuan"
},
{
"family": "Chen",
"given": "Wei-Ta"
},
{
"family": "Chen",
"given": "Shih-Pin"
},
{
"family": "Wang",
"given": "Yen-Feng"
},
{
"family": "Lin",
"given": "Ching-Po"
},
{
"family": "Chou",
"given": "Kun-Hsien"
},
{
"family": "Wang",
"given": "Shuu-Jiun"
}
],
"container-title-short":
"volume": "8",
"issue": "2",
"page": "fcag110",
"DOI": "10.1093/
"PMID": "41958921",
"PMCID": "PMC13056717",
"ISSN": "2632-1297",
"publisher": "Oxford University Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
28
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1186/s10194-023-01670-6 [code]
- Increased MRI-based Brain Age in chronic migraine patients.Journal: The journal of headache and painIn common: pain, structural MRI / diffusion, clinical / translational, 8 references
- [2] doi:10.1186/s10194-025-02188-9
- Perfusion dynamics in reversible cerebral vasoconstriction syndrome.Journal: The journal of headache and painIn common: pain, structural MRI / diffusion, clinical / translational, 2 references, author Shih-Pin Chen
- [3] doi:10.1093/braincomms/fcac233
- Regional rather than global brain age mediates cognitive function in cerebral small vessel disease.Journal: Brain communicationsIn common: structural MRI / diffusion, 4 references, author Ching-Po Lin
- [4] doi:10.1126/sciadv.adk6063 [code]
- Neuroimaging epicenters as potential sites of onset of the neuroanatomical pathology in schizophrenia.Journal: Science advancesIn common: structural MRI / diffusion, 2 references, author Ching-Po Lin
- [5] doi:10.1002/hbm.70458 [code]
- A Systematic Evaluation of the Performance of Multiple Brain Age Algorithms in Two Cohorts of Youth.Journal: Human brain mappingIn common: structural MRI / diffusion, 5 references
- [6] doi:10.1038/s41398-023-02379-5
- Investigating brain aging trajectory deviations in different brain regions of individuals with schizophrenia using multimodal magnetic resonance imaging and brain-age prediction: a multicenter study.Journal: Translational psychiatryIn common: structural MRI / diffusion, 1 reference, author Ching-Po Lin
- [7] doi:10.1038/s41537-022-00325-w
- Predicting aging trajectories of decline in brain volume, cortical thickness and fractional anisotropy in schizophrenia.Journal: Schizophrenia (Heidelberg, Germany)In common: structural MRI / diffusion, 1 reference, author Ching-Po Lin
- [8] doi:10.1161/jaha.125.043931 [code]
- Commissural Fiber Disruption Is Associated With Symptom Onset in Cerebral Autosomal-Dominant Arteriopathy With Subcortical Infarcts and Leukoencephalopathy.Journal: Journal of the American Heart AssociationIn common: structural MRI / diffusion, clinical / translational, author Shih-Pin Chen
- [9] doi:10.1002/hbm.70627 [code]
- Investigating the Contribution of Molecular-Enriched Functional Connectivity to Brain-Age Analysis.Journal: Human brain mappingIn common: structural MRI / diffusion, 5 references
- [10] doi:10.1212/wnl.0000000000207484 [code]
- Evaluation of a Clustering Approach to Define Distinct Subgroups of Patients With Migraine to Select Electroacupuncture Treatments.Journal: NeurologyIn common: pain, clinical / translational, 3 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 7 scripts, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:6ec5f7a3d8e20531…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1093/braincomms/fcag110)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1093/braincomms/fcag110.svg
:target: https://openscicode.org/badge/doi/10.1093/braincomms/fcag110
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1093/braincomms/fcag110"><img src="https://openscicode.org/badge/doi/10.1093/braincomms/fcag110.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
