OSCR

The dual interpretation of edge time series: Time-varying connectivity versus statistical interaction.

Code ↔ Paper

1 match between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 1 match
  1. [1] § STAR★Methods › Quantification and statistical analysis › Prewhitening ↔ fit_models.m, lines 34–120 · score 0.55 · regression coefficients, node pairs, residuals, ij, matrix

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 120 lines · 3.4 KB · no license · 1 match

  1. clear all
  2. close all
  3. clc
  4. %% Description
  5. %
  6. % In this script, we read in time series data -- parcel-level Ca++
  7. % imaging data and behavioral time courses. The goals is to fit lineaer
  8. % models that explain the behavioral data in terms of:
  9. %
  10. % 1. the z-scored activity of parcel i,
  11. % 2. the z-scored activity of parcel j,
  12. % 3. the element-wise product of those z-scored time series (referred
  13. % to in our previous work as an 'edge time series').
  14. %
  15. % This procedure is repeated for all unique {i,j} pairs, populating
  16. % matrices of regression coefficients.
  17. %
  18. % We repeat this entire procedure for seven behavioral time courses. For
  19. % reference, these data come from 'subject 18' in this paper:
  20. %
  21. % Chen, X., Mu, Y., Hu, Y., Kuan, A. T., Nikitchenko, M.,
  22. % Randlett, O., ... & Ahrens, M. B. (2018). Brain-wide organization
  23. % of neuronal activity and convergent sensorimotor transformations in
  24. % larval zebrafish. Neuron, 100(4), 876-890.
  25. %
  26. % If you use this code in your own work, please cite the original data
  27. % source, but also our paper:
  28. %
  29. % Merritt, H., Mejia, A., & Betzel, R. (2024). The dual
  30. % interpretation of edge time series: Time-varying connectivity
  31. % versus statistical interaction. bioRxiv, 2024-08.
  32. %% Analysis
  33. % load data
  34. load data
  35. z = zscore(z); % z-score time series
  36. [nt,n] = size(z); % number of frames, number of parcels
  37. [u,v] = find(triu(ones(n),1)); % upper triangle indices
  38. % outer loop - over behavioral measures
  39. for j = 1:size(b,2)
  40. % behavior time series
  41. y = b(:,j);
  42. % constants
  43. nobs = length(y);
  44. dft = nobs - 1;
  45. dfe = nobs - 4;
  46. p = 4;
  47. % more constants
  48. ybar = mean(y);
  49. sst = norm(y - ybar)^2;
  50. % preallocate arrays for rsquared, regression coefficients, and pvalues
  51. rsqu = zeros(length(u),1);
  52. betas = zeros(length(u),p);
  53. pvals = zeros(length(u),p);
  54. % loop over all node pairs
  55. for i = 1:length(u)
  56. % update
  57. if mod(i,round(length(u)/51)) == 0
  58. fprintf('behavioral measure %i, %.2f percent complete (%i of %i edges)\n',j,100*i/length(u),i,length(u));
  59. end
  60. % matrix of explanatory values
  61. x = ones(nt,4);
  62. x(:,1) = z(:,u(i));
  63. x(:,2) = z(:,v(i));
  64. x(:,3) = z(:,u(i)).*z(:,v(i));
  65. % get betas and pvalues
  66. [Q,R] = qr(x,0);
  67. % regression coefficients -- could stop here if we didn't want to
  68. % do states
  69. beta = R\(Q'*y);
  70. % behavior predicted by model + residuals
  71. yhat = x*beta;
  72. residuals = y - yhat;
  73. sse = norm(residuals)^2;
  74. mse = sse./dfe;
  75. ri = R\eye(p);
  76. xtxi = ri*ri';
  77. covb = xtxi*mse;
  78. se = sqrt(diag(covb));
  79. % t-statistic, pvalue (from distribution)
  80. t = beta./se;
  81. pval = 2*(tcdf(-abs(t),dfe));
  82. % keep rsquared, betas, and pvalues
  83. rsqu(i) = 1 - sse./sst;
  84. betas(i,:) = beta;
  85. pvals(i,:) = pval;
  86. end
  87. % plot the three matrices -- here, we only show upper triangle
  88. s = zeros(1,3);
  89. tnames = {'beta_i','beta_j','beta_{ij}'};
  90. figure;
  91. for i = 1:3
  92. m = zeros(n);
  93. m(triu(ones(n),1) > 0) = betas(:,i);
  94. s(i) = subplot(1,3,i); imagesc(m); title(tnames{i}); xlabel('parcels'); ylabel('parcels');
  95. end
  96. set(s,'clim',[-max(abs(m(:))),max(abs(m(:)))]*0.25);
  97. drawnow;
  98. end

fit_models.m at commit f9f6238, no license · at the source

Overview

Authors: Haily Merritt1,2, Amanda Mejia3, Richard Betzel1,4,5,6
ORCID iDs: Richard Betzel
  1. Cognitive Science Program, Indiana University, Bloomington, IN, USA
  2. School of Informatics, Computing, and Engineering, Indiana University, Bloomington, IN, USA
  3. Department of Statistics, Indiana University, Bloomington, IN, USA
  4. Department of Neuroscience, University of Minnesota, Minneapolis, MN, USA
  5. Masonic Institute for the Developing Brain, University of Minnesota, Minneapolis, MN, USA
  6. Department of Psychological and Brain Sciences, Indiana University, Bloomington, IN, USA
Institutions: Indiana University Bloomington (United States); Indiana University (United States); University of Minnesota (United States)
Journal: iScience, volume 29, issue 6, article 115949
Dates: received 19 September 2024; accepted 27 April 2026; published online 22 May 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1016/j.isci.2026.115949 · PMID 42231974 · PMCID PMC13224015 · OpenAlex W4402098305
Open access: gold, a free copy (OpenAlex)
Status: code verified
Methods: Spectral & time-frequency, Statistics, Preprocessing, Graphs, Single-unit activity, calcium imaging, Smoothing, state filtering, decompositions
Keywords: natural sciences, biological sciences, neuroscience, systems neuroscience, techniques in neuroscience
Topic: Complex Systems and Time Series Analysis (Economics and Econometrics, Economics, Econometrics and Finance), according to OpenAlex
Funding: Neighborhood Coalition for Shelter; National Science Foundation; National Institute on Aging; National Science Foundation Division of Information and Intelligent Systems (2023985)
Citations: cited by 1 paper (Europe PMC); 96 references in the paper
Research resources: NiLearn RRID:SCR_001362http, MATLAB RRID:SCR_001622https, Freesurfer RRID:SCR_001847https, Brain Connectivity Toolbox RRID:SCR_004841https, fMRIPrep RRID:SCR_016216https

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

Its files are read in the Code ↔ Paper reader above, with 1 match between paragraphs and lines of code.

Zenodo 18377915

License: MIT
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data and code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
8 files

Zenodo 18377883

License: CC-BY-4.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data and code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
2 files

brain-networks/ets_glms

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: f9f6238da55c6121880a412c901db56888a95f2b, 14 November 2025
Languages: MATLAB (1)
Size: 3 files, 1 script
Software Heritage: not archived
Found in: the Zenodo archive record
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
2 files

brain-networks/edge-centric_demo

License: MIT
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 87f1b65890274f63b97dc62e647bd730321d58a9, 6 November 2020
Languages: MATLAB (6)
Size: 12 files, 6 scripts
Software Heritage: archived
Found in: the Zenodo archive record
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
8 files

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:

  • 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 14 scripts, each with its path and the digest of its content;
  • 1 match between paragraphs of the paper and lines of the code (method lexical-v1);
  • 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

Datasets cited

Availability statements

The paper has a code and data availability statement and a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing them here; in short, from what the harvester recognized in them:

Read them in the paper: doi.org/10.1016/j.isci.2026.115949.

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 2, 28 September 2026

  • Authors: added Richard Betzel (0000-0001-9200-1681); removed Richard Betzel

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 5 keywords, 4 funders, 89 references, 5 RRIDs.

Cite

This paper

Merritt, H., Mejia, A., & Betzel, R. (2026). The dual interpretation of edge time series: Time-varying connectivity versus statistical interaction. iScience, 29(6), 115949. https://doi.org/10.1016/j.isci.2026.115949

BibTeX

@article{merritt2026dual,
author = {Merritt, Haily and Mejia, Amanda and Betzel, Richard},
title = {{The dual interpretation of edge time series: Time-varying connectivity versus statistical interaction}},
journal = {iScience},
year = {2026},
month = may,
volume = {29},
number = {6},
pages = {115949},
publisher = {Elsevier},
issn = {2589-0042},
doi = {10.1016/j.isci.2026.115949},
url = {https://doi.org/10.1016/j.isci.2026.115949},
pmid = {42231974},
pmcid = {PMC13224015}
}

RIS

TY - JOUR
AU - Merritt, Haily
AU - Mejia, Amanda
AU - Betzel, Richard
TI - The dual interpretation of edge time series: Time-varying connectivity versus statistical interaction
T2 - iScience
J2 - iScience
PY - 2026
DA - 2026/05/22
VL - 29
IS - 6
SP - 115949
SN - 2589-0042
PB - Elsevier
DO - 10.1016/j.isci.2026.115949
UR - https://doi.org/10.1016/j.isci.2026.115949
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.isci.2026.115949",
"type": "article-journal",
"title": "The dual interpretation of edge time series: Time-varying connectivity versus statistical interaction",
"container-title": "iScience",
"author": [
{
"family": "Merritt",
"given": "Haily"
},
{
"family": "Mejia",
"given": "Amanda"
},
{
"family": "Betzel",
"given": "Richard"
}
],
"container-title-short": "iScience",
"volume": "29",
"issue": "6",
"page": "115949",
"DOI": "10.1016/j.isci.2026.115949",
"PMID": "42231974",
"PMCID": "PMC13224015",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.isci.2026.115949",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
22
]
]
}
}

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.1038/s41467-026-76011-7 [code]
Human cortex organizes dynamic co-fluctuations along the sensorimotor-association axis.
Journal: Nature communications
In common: Statistics and Machine Learning Toolbox, 20 references
[2] doi:10.1162/netn.a.571 [code]
Regional activity and interregional functional connectivity uniquely contribute to social cognitive judgments during movie-watching.
Journal: Network neuroscience (Cambridge, Mass.)
In common: 12 references, author Richard Betzel
[3] doi:10.1038/s41467-026-75959-w [code]
Charting higher-order models of brain function beyond pairwise interactions.
Journal: Nature communications
In common: Statistics and Machine Learning Toolbox, 10 references
[4] doi:10.1162/netn.a.570 [code]
Higher-order statistics for constructing centered edge functional connectivity.
Journal: Network neuroscience (Cambridge, Mass.)
In common: 11 references
[5] doi:10.1162/imag.a.1254 [code]
The individuality of single-frame functional brain connectivity.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Statistics and Machine Learning Toolbox, 9 references
[6] doi:10.1162/imag.a.1285 [code]
Individualized mapping of functional brain networks in older adulthood.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Statistics and Machine Learning Toolbox, 4 references, author Richard Betzel
[7] doi:10.1002/hbm.70483 [code]
Untamed: Unconstrained Tensor Decomposition and Graph Node Embedding for Cortical Parcellation.
Journal: Human brain mapping
In common: Statistics and Machine Learning Toolbox, humanconnectome.org/study/hcp-young-adult, 5 references
[8] doi:10.1186/s12916-026-04903-y [code]
Structural connectome architecture and biological vulnerability shape cortical atrophy in cocaine use disorder.
Journal: BMC medicine
In common: Statistics and Machine Learning Toolbox, humanconnectome.org/study/hcp-young-adult, 5 references
[9] doi:10.21203/rs.3.rs-9326213/v1 [code]
Multi-task fMRI outperforms resting-state fMRI for revealing task-invariant organization of the human brain
Journal: Research Square (preprint)
In common: humanconnectome.org/study/hcp-young-adult, 5 references
[10] doi:10.64898/2026.03.09.710558 [code]
Multi-task fMRI outperforms resting-state fMRI for revealing task-invariant organization of the human brain
Journal: bioRxiv (preprint)
In common: humanconnectome.org/study/hcp-young-adult, 5 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.

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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.