The dual interpretation of edge time series: Time-varying connectivity versus statistical interaction.
The 1 match
- [1] § STAR★Methods › Quantification and statistical analysis › Prewhitening ↔ fit_models.m, lines 34 to 120 · score 0.55 · regression coefficients, node pairs, residuals, ij, matrix · Report a mismatch
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 · 120 lines · 3.4 KB · no license · 1 match
- clear all
- close all
- clc
- %% Description
- %
- % In this script, we read in time series data -- parcel-level Ca++
- % imaging data and behavioral time courses. The goals is to fit lineaer
- % models that explain the behavioral data in terms of:
- %
- % 1. the z-scored activity of parcel i,
- % 2. the z-scored activity of parcel j,
- % 3. the element-wise product of those z-scored time series (referred
- % to in our previous work as an 'edge time series').
- %
- % This procedure is repeated for all unique {i,j} pairs, populating
- % matrices of regression coefficients.
- %
- % We repeat this entire procedure for seven behavioral time courses. For
- % reference, these data come from 'subject 18' in this paper:
- %
- % Chen, X., Mu, Y., Hu, Y., Kuan, A. T., Nikitchenko, M.,
- % Randlett, O., ... & Ahrens, M. B. (2018). Brain-wide organization
- % of neuronal activity and convergent sensorimotor transformations in
- % larval zebrafish. Neuron, 100(4), 876-890.
- %
- % If you use this code in your own work, please cite the original data
- % source, but also our paper:
- %
- % Merritt, H., Mejia, A., & Betzel, R. (2024). The dual
- % interpretation of edge time series: Time-varying connectivity
- % versus statistical interaction. bioRxiv, 2024-08.
- %% Analysis
- % load data
- load data
- z = zscore(z); % z-score time series
- [nt,n] = size(z); % number of frames, number of parcels
- [u,v] = find(triu(ones(n),1)); % upper triangle indices
- % outer loop - over behavioral measures
- for j = 1:size(b,2)
- % behavior time series
- y = b(:,j);
- % constants
- nobs = length(y);
- dft = nobs - 1;
- dfe = nobs - 4;
- p = 4;
- % more constants
- ybar = mean(y);
- sst = norm(y - ybar)^2;
- % preallocate arrays for rsquared, regression coefficients, and pvalues
- rsqu = zeros(length(u),1);
- betas = zeros(length(u),p);
- pvals = zeros(length(u),p);
- % loop over all node pairs
- for i = 1:length(u)
- % update
- if mod(i,round(length(u)/51)) == 0
- fprintf('behavioral measure %i, %.2f percent complete (%i of %i edges)\n',j,100*i/length(u),i,length(u));
- end
- % matrix of explanatory values
- x = ones(nt,4);
- x(:,1) = z(:,u(i));
- x(:,2) = z(:,v(i));
- x(:,3) = z(:,u(i)).*z(:,v(i));
- % get betas and pvalues
- [Q,R] = qr(x,0);
- % regression coefficients -- could stop here if we didn't want to
- % do states
- beta = R\(Q'*y);
- % behavior predicted by model + residuals
- yhat = x*beta;
- residuals = y - yhat;
- sse = norm(residuals)^2;
- mse = sse./dfe;
- ri = R\eye(p);
- xtxi = ri*ri';
- covb = xtxi*mse;
- se = sqrt(diag(covb));
- % t-statistic, pvalue (from distribution)
- t = beta./se;
- pval = 2*(tcdf(-abs(t),dfe));
- % keep rsquared, betas, and pvalues
- rsqu(i) = 1 - sse./sst;
- betas(i,:) = beta;
- pvals(i,:) = pval;
- end
- % plot the three matrices -- here, we only show upper triangle
- s = zeros(1,3);
- tnames = {'beta_i','beta_j','beta_{ij}'};
- figure;
- for i = 1:3
- m = zeros(n);
- m(triu(ones(n),1) > 0) = betas(:,i);
- s(i) = subplot(1,3,i); imagesc(m); title(tnames{i}); xlabel('parcels'); ylabel('parcels');
- end
- set(s,'clim',[-max(abs(m(:))),max(abs(m(:)))]*0.25);
- drawnow;
- end
fit_models.m at commit f9f6238, no license · at the source
Overview
- Cognitive Science Program, Indiana University, Bloomington, IN, USA
- School of Informatics, Computing, and Engineering, Indiana University, Bloomington, IN, USA
- Department of Statistics, Indiana University, Bloomington, IN, USA
- Department of Neuroscience, University of Minnesota, Minneapolis, MN, USA
- Masonic Institute for the Developing Brain, University of Minnesota, Minneapolis, MN, USA
- Department of Psychological and Brain Sciences, Indiana University, Bloomington, IN, USA
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
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
- 28 September 2026: the link answers (HTTP 200)
8 files
- example_code.m, MATLAB, 98 lines
- fcn/
fcn_cmaphot.m , MATLAB, 7 lines - fcn/
fcn_edgets.m , MATLAB, 33 lines - fcn/
fcn_edgets2edgecorr.m , MATLAB, 21 lines - fcn/
fcn_node_entropy.m , MATLAB, 26 lines - fcn/
fcn_profilesim.m , MATLAB, 21 lines - LICENSE, License, 21 lines
- README.md, Text, 19 lines
Zenodo 18377883
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
- 28 September 2026: the link answers (HTTP 200)
2 files
- fit_models.m, MATLAB, 120 lines
- README.md, Text, 34 lines
brain-networks/ets_glms
f9f6238da55c6121880a412c901db56888a95f2b, 14 November 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
2 files
- fit_models.m, MATLAB, 120 lines, 1 match
- README.md, Text, 34 lines
brain-networks/edge-centric_demo
87f1b65890274f63b97dc62e647bd730321d58a9, 6 November 2020Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
8 files
- example_code.m, MATLAB, 98 lines
- fcn/
fcn_cmaphot.m , MATLAB, 7 lines - fcn/
fcn_edgets.m , MATLAB, 33 lines - fcn/
fcn_edgets2edgecorr.m , MATLAB, 21 lines - fcn/
fcn_node_entropy.m , MATLAB, 26 lines - fcn/
fcn_profilesim.m , MATLAB, 21 lines - LICENSE, License, 21 lines
- README.md, Text, 19 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:
- 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
- data.mendeley.com/
datasets/ , at Mendeley Data; found in “Data and code availability”922xsfxh2g - figshare:7272617, at figshare; found in “Data and code availability”
- humanconnectome.org/
study/ , at Human Connectome Project; found in the text, “Functional preprocessing”hcp-young-adult
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:
- they point to 2 datasets: data.mendeley.com/
datasets/ , figshare 7272617922xsfxh2g - they point to the authors' code: Zenodo 18377883, Zenodo 18377915
- they say that the data are available on request
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://
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/
url = {https://
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/
VL - 29
IS - 6
SP - 115949
SN - 2589-0042
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"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":
"volume": "29",
"issue": "6",
"page": "115949",
"DOI": "10.1016/
"PMID": "42231974",
"PMCID": "PMC13224015",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://
"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/s42003-024-05766-w [code]
- Modular subgraphs in large-scale connectomes underpin spontaneous co-fluctuation events in mouse and human brains.Journal: Communications biologyIn common: Statistics and Machine Learning Toolbox, 29 references, author Richard Betzel
- [2] doi:10.1016/j.neuroimage.2022.119591 [code]
- Edge-centric analysis of time-varying functional brain networks with applications in autism spectrum disorder.Journal: NeuroImageIn common: Statistics and Machine Learning Toolbox, 21 references
- [3] doi:10.1016/j.neuroimage.2022.119476 [code]
- BOLD cofluctuation 'events' are predicted from static functional connectivity.Journal: NeuroImageIn common: Statistics and Machine Learning Toolbox, 21 references
- [4] doi:10.1162/netn_a_00321
- Hierarchical organization of spontaneous co-fluctuations in densely sampled individuals using fMRI.Journal: Network neuroscience (Cambridge, Mass.)In common: 21 references
- [5] doi:10.1038/s41467-026-76011-7 [code]
- Human cortex organizes dynamic co-fluctuations along the sensorimotor-association
axis. Journal: Nature communicationsIn common: Statistics and Machine Learning Toolbox, 20 references - [6] doi:10.1162/imag_a_00443 [code]
- Temporal variability of brain-behavior relationships in fine-scale dynamics of edge time series.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Statistics and Machine Learning Toolbox, 16 references, author Richard Betzel
- [7] doi:10.1162/imag_a_00026 [code]
- Synchronous high-amplitude co-fluctuations of functional brain networks during movie-watching.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Statistics and Machine Learning Toolbox, humanconnectome.org/study/hcp-young-adult, 17 references
- [8] 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
- [9] doi:10.1038/s42003-022-03466-x [code]
- Time-resolved structure-function coupling in brain networks.Journal: Communications biologyIn common: humanconnectome.org/study/hcp-young-adult, 10 references, author Richard Betzel
- [10] doi:10.1162/netn_a_00323 [code]
- Controversies and progress on standardization of large-scale brain network nomenclature.Journal: Network neuroscience (Cambridge, Mass.)In common: 16 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: 4 repositories of the authors' code, each at its verified commit and with its license, 14 scripts, and 1 match 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:0d798d1f3c1373b5…
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.1016/j.isci.2026.115949)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1016/j.isci.2026.115949.svg
:target: https://openscicode.org/badge/doi/10.1016/j.isci.2026.115949
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.isci.2026.115949"><img src="https://openscicode.org/badge/doi/10.1016/j.isci.2026.115949.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.
