OSCR

Testing for interactions in multivariate data.

Code ↔ Paper

12 matches 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 12 matches · all tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
  1. [1] § Materials and methods › Decoding methods ↔ misc/svm_classify.m, the whole file · a weak match · score 0.68 · Nearest Neighbour, fitcecoc, fitcknn, fitclinear, fitcsvm, classifier · Report a mismatch
  2. [2] § Materials and methods › Decoding methods ↔ misc/svm_classify_old.m, the whole file · a weak match · score 0.68 · Nearest Neighbour, fitcecoc, fitcknn, fitclinear, fitcsvm, classifier · Report a mismatch
  3. [3] § Materials and methods › Reward learning ↔ data/get_reward_data.m, the whole file · a weak match · score 0.66 · median split, RPE sign, trajectories, grand, Reward · Report a mismatch
  4. [4] § Materials and methods › Multivariate linear model with conjugate priors › Likelihood. ↔ linear-regression/bayes_glinear_estimate.m, the whole file · a weak match · score 0.64 · regression coefficients, independent variables, noise, Gaussian, covariance, zero · Report a mismatch
  5. [5] § Materials and methods › Multivariate linear model with conjugate priors › Likelihood. ↔ linear-regression/bayes_glm_regression.m, the whole file · a weak match · score 0.64 · multivariate Gaussian, independent variables, regression, noise, coefficients, errors · Report a mismatch
  6. [6] § Materials and methods › Univariate methods ↔ toolbox/plot_anova_map.m, the whole file · a weak match · score 0.62 · Benjamini Hochberg, FDR correction, BH, map, hypotheses · Report a mismatch
  7. [7] § Materials and methods › Multivariate linear model with conjugate priors › Factorial designs. ↔ linear-regression/bayes_glm_anova1.m, the whole file · a weak match · score 0.60 · way ANOVAs, log Bayes factor, alternative hypothesis, favour, model · Report a mismatch
  8. [8] § Materials and methods › Univariate methods ↔ toolbox/plot_classifier_results.m, the whole file · a weak match · score 0.58 · Benjamini Hochberg, FDR correction, BH · Report a mismatch
  9. [9] § Materials and methods › Multivariate linear model with conjugate priors › Factorial designs. ↔ misc/savage_dickey_vector.m, the whole file · a weak match · score 0.58 · Savage Dickey, contrast matrix, posterior · Report a mismatch
  10. [10] § Materials and methods › Multivariate linear model with conjugate priors › Factorial designs. ↔ linear-regression/bayes_glm_regression.m, the whole file · a weak match · score 0.55 · Savage Dickey, design matrix, fitting, posterior, Bayesian, model · Report a mismatch
  11. [11] § Materials and methods › Multivariate linear model with conjugate priors › Bayes factors. ↔ misc/savage_dickey_vector.m, the whole file · a weak match · score 0.51 · log Bayes Factor, alternative hypothesis, enforce, probability, posterior · Report a mismatch
  12. [12] § Materials and methods › Decoding methods ↔ toolbox/plot_classifier_results.m, the whole file · a weak match · score 0.51 · Benjamini Hochberg procedure, classification, FDR · 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 · 106 lines · 2.9 KB · no license · 2 matches

  1. function [logBF,glm] = bayes_glm_regression (X,y,method)
  2. % Bayesian GLM regression
  3. % FORMAT [logBF,glm] = bayes_glm_regression (X,y,method)
  4. %
  5. % X [N x K] Design matrix (Independent Variables).
  6. % Kth column must be vector of 1's.
  7. % y [N x 1] Dependent Variable
  8. % method 'G' Multivariate Gaussian priors and posteriors
  9. % 'T' Multivariate T (MVT) priors and posteriors
  10. %
  11. % Log Bayes Factors in favour of alternative hypothesis:
  12. % logBF(1) Fit Full and Reduced Model separately (Multi-Fitting)
  13. % logBF(2) Savage-Dickey
  14. % logBF(3) Default Bayes Factors
  15. %
  16. % glm Linear Model parameters
  17. %
  18. % Single variance component assumed
  19. [N,K] = size(X);
  20. % Check Kth column is vector of 1's
  21. d=X(:,K)-ones(N,1);
  22. if sum(d.^2) > 0
  23. disp('Error in bayes_glm_regression: last column of design matrix must be column of 1''s.');
  24. return
  25. end
  26. % Centre design matrix - as in Rouder and Morey (2013)
  27. for p=1:K-1,
  28. X(:,p)=X(:,p)-mean(X(:,p));
  29. end
  30. % Subtract data mean
  31. my = mean(y);
  32. vy = std(y)^2;
  33. y = y-my;
  34. % Prior precision/variance matrices
  35. XK = X(:,1:K-1);
  36. B0 = (XK'*XK)/N;
  37. B0 = blkdiag(B0,1);
  38. % Rouder and Morey (2013) set the prior covariance of regression
  39. % coefficients to be proportional to inv(B0). Hence choice of the
  40. % above term.
  41. switch method
  42. case 'T',
  43. % Single variance component assumed - intrinsic to MVT prior
  44. % c0 must be larger than 1 for finite variance
  45. % 2*c0 is the degrees of freedom of T-prior
  46. % (c0=1/2 for Cauchy)
  47. glm.c0=1.1;
  48. glm.B0=B0;
  49. glm.w0=zeros(K,1);
  50. % Scale observation noise level to variance of dependent variable.
  51. % This then changes scale of prior variance over regression
  52. % coefficients through T-prior.
  53. glm.b0 = 1/(glm.c0*vy);
  54. % Define null model
  55. glm_null = glm;
  56. glm_null.w0 = glm.w0(K);
  57. glm_null.B0 = glm.B0(K,K);
  58. case 'G',
  59. glm.pE=zeros(K,1);
  60. % Single variance component assumed
  61. glm.Ce=vy*eye(N); % IID Error matrix
  62. % Scale prior variance by data variability
  63. C0 = inv(B0);
  64. glm.pC=vy*C0;
  65. % Define null model
  66. glm_null = glm;
  67. glm_null.pE = glm.pE(K);
  68. glm_null.pC = glm.pC(K,K);
  69. otherwise
  70. disp('Unknown method in bayes_glm_regression.m');
  71. return
  72. end
  73. glm.X = X;
  74. glm_null.X = glm.X(:,K);
  75. glm = bayes_linear_estimate (glm,y,method);
  76. % Savage-Dickey
  77. c = eye(K);
  78. logBF(2) = bayes_linear_test (glm,c,method);
  79. % Fit null model
  80. glm_null = bayes_linear_estimate (glm_null,y,method);
  81. logBF(1) = glm.F - glm_null.F;
  82. % Default Bayes Factor
  83. R2 = glm.R2;
  84. bf10 = linregbf(R2,N,K-1);
  85. logBF(3) = log(bf10);

bayes_glm_regression.m at commit 60e6aff, no license · at the source

Overview

Authors: Will Penny1, Tom Sambrook1, Louis Renoult1
  1. School of Psychology, University of East Anglia, Norwich, United Kingdom
Institutions: University of East Anglia (United Kingdom)
Journal: PloS one, volume 21, issue 11, article e0338580
Dates: received 19 December 2025; accepted 29 September 2026; published online 10 November 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pone.0338580 · PMID 43008059 · PMCID PMC13750587 · OpenAlex W4416889594
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: EEG (modality), human (organism), cognitive (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Machine learning, Preprocessing, Evoked potentials
MeSH: Bayes Theorem, Brain, Electroencephalography, Humans, Linear Models, Memory, Multivariate Analysis
Journal subjects: Research and Analysis Methods, Bioassays and Physiological Analysis, Electrophysiological Techniques, Brain Electrophysiology, Electroencephalography, Biology and Life Sciences, Physiology, Electrophysiology, Neurophysiology, Neuroscience, Brain Mapping, Medicine and Health Sciences, Clinical Medicine, Clinical Neurophysiology, Imaging Techniques, Neuroimaging, Pharmacology, Drug Interactions, Event-Related Potentials, Physical Sciences, Mathematics, Probability Theory, Random Variables, Covariance, Simulation and Modeling, Functional Magnetic Resonance Imaging, Diagnostic Medicine, Diagnostic Radiology, Magnetic Resonance Imaging, Radiology and Imaging, Cognitive Science, Cognitive Psychology, Learning, Psychology, Social Sciences, Learning and Memory, Research Design, Experimental Design, Factorial Design
Topic: Statistical Methods and Applications (Statistics and Probability, Mathematics), according to OpenAlex
Citations: not cited yet (Europe PMC); 64 references in the paper

Abstract

Factorial designs are a mainstay of the scientific paradigm, allowing the effects of multiple experimental factors and their interactions to be efficiently studied within a single experiment. In brain imaging, however, multivariate data analyses commonly proceed using multivariate decoding and we argue that the standard “difference of accuracies” test is not a true test of interactions. To remedy this situation we propose an encoding method based on a Bayesian multivariate linear model which is ideally suited to the factorial analysis of such data. We show how it can be used to test for multivariate main effects and interactions using data from EEG studies of reward learning and declarative memory. This approach additionally allows for null hypotheses to be accepted and allows one to infer whether multivariate effects are driven by collections of univariate effects or voxel dependencies. We also propose that those wishing to pursue tests for interactions using decoding methods use an “accuracy of differences” test.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

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

wpennyUEA/MLC

License: none: the authors keep all their rights
State: the link answers, verified on 12 November 2026
Evidence: files inventoried
Commit: 60e6affb5daba82583d309292ef031accf1ad5b1, 17 November 2025
Languages: MATLAB (131), C (2)
Size: 154 files, 133 scripts
Software Heritage: not archived
Found in: “Data Availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: SPM (38 files), Statistics and Machine Learning Toolbox (4 files)
Availability: 1 check, the latest on 12 November 2026: the link answers
  • 12 November 2026: the link answers
134 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:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 133 scripts, each with its path and the digest of its content;
  • 12 matches 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

No dataset and no data link were found in the paper.

Data Availability

A matlab implementation of MLC is provided in the GitHub archive https://github.com/wpennyUEA/MLC. Links to the empirical data for the Reward Learning and Declarative Memory experiments are provided in the README file in the GitHub archive.

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, 12 November 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 7 MeSH terms, 2 funders, 48 references.

Cite

This paper

Penny, W., Sambrook, T., & Renoult, L. (2026). Testing for interactions in multivariate data. PloS one, 21(11), e0338580. https://doi.org/10.1371/journal.pone.0338580

BibTeX

@article{penny2026testing,
author = {Penny, Will and Sambrook, Tom and Renoult, Louis},
title = {{Testing for interactions in multivariate data}},
journal = {PloS one},
year = {2026},
month = nov,
volume = {21},
number = {11},
pages = {e0338580},
publisher = {PLOS},
issn = {1932-6203},
doi = {10.1371/journal.pone.0338580},
url = {https://doi.org/10.1371/journal.pone.0338580},
pmid = {43008059},
pmcid = {PMC13750587}
}

RIS

TY - JOUR
AU - Penny, Will
AU - Sambrook, Tom
AU - Renoult, Louis
TI - Testing for interactions in multivariate data
T2 - PloS one
J2 - PLoS One
PY - 2026
DA - 2026/11/10
VL - 21
IS - 11
SP - e0338580
SN - 1932-6203
PB - PLOS
DO - 10.1371/journal.pone.0338580
UR - https://doi.org/10.1371/journal.pone.0338580
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pone.0338580",
"type": "article-journal",
"title": "Testing for interactions in multivariate data",
"container-title": "PloS one",
"author": [
{
"family": "Penny",
"given": "Will"
},
{
"family": "Sambrook",
"given": "Tom"
},
{
"family": "Renoult",
"given": "Louis"
}
],
"container-title-short": "PLoS One",
"volume": "21",
"issue": "11",
"page": "e0338580",
"DOI": "10.1371/journal.pone.0338580",
"PMID": "43008059",
"PMCID": "PMC13750587",
"ISSN": "1932-6203",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pone.0338580",
"language": "en",
"issued": {
"date-parts": [
[
2026,
11,
10
]
]
}
}

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.3389/fnins.2022.989589 [code]
Decoding continuous variables from event-related potential (ERP) data with linear support vector regression using the Decision Decoding Toolbox (DDTBOX).
Journal: Frontiers in neuroscience
In common: Statistics and Machine Learning Toolbox, EEG, 7 references
[2] doi:10.3758/s13414-024-02916-4 [code]
An early effect of the parafoveal preview on post-saccadic processing of English words.
Journal: Attention, perception & psychophysics
In common: Statistics and Machine Learning Toolbox, EEG, cognitive, 6 references
[3] doi:10.1038/s41467-024-48302-4 [code]
Spatiotemporal brain hierarchies of auditory memory recognition and predictive coding.
Journal: Nature communications
In common: SPM, Statistics and Machine Learning Toolbox, cognitive, 5 references
[4] doi:10.1167/jov.26.8.2 [code]
Disentangling objects' contextual associations from perceptual and conceptual attributes using time-resolved neural decoding.
Journal: Journal of vision
In common: Statistics and Machine Learning Toolbox, EEG, cognitive, 5 references
[5] doi:10.1371/journal.pone.0347992 [code]
Rotation-tolerant representations elucidate the time-course of high-level object processing.
Journal: PloS one
In common: Statistics and Machine Learning Toolbox, EEG, cognitive, 5 references
[6] doi:10.1162/imag.a.1234 [code]
Multiscale parcellation of dynamic causal models of the brain.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: SPM, Statistics and Machine Learning Toolbox, 4 references
[7] doi:10.1007/s11571-025-10230-4
Shared neural dynamics of facial expression processing.
Journal: Cognitive neurodynamics
In common: EEG, 5 references
[8] doi:10.1371/journal.pcbi.1011760 [code]
Mapping the dynamics of visual feature coding: Insights into perception and integration.
Journal: PLoS computational biology
In common: Statistics and Machine Learning Toolbox, EEG, cognitive, 5 references
[9] doi:10.3390/s25061669 [code]
Vocal Emotion Perception and Musicality-Insights from EEG Decoding.
Journal: Sensors (Basel, Switzerland)
In common: EEG, cognitive, 5 references
[10] doi:10.1371/journal.pbio.3002494 [code]
Older adults preserve audiovisual integration through enhanced cortical activations, not by recruiting new regions.
Journal: PLoS biology
In common: SPM, Statistics and Machine Learning Toolbox, cognitive, 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.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.1371/journal.pone.0338580.svg)](https://openscicode.org/badge/doi/10.1371/journal.pone.0338580)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1371/journal.pone.0338580.svg
   :target: https://openscicode.org/badge/doi/10.1371/journal.pone.0338580
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1371/journal.pone.0338580"><img src="https://openscicode.org/badge/doi/10.1371/journal.pone.0338580.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.