OSCR

Comparing Brain Responses to Moral and Semantic Violations.

Code ↔ Paper

5 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 5 matches
  1. [1] § 2. Materials and Methods › 2.4. EEG Acquisition and Analysis ↔ Analysis/Step3_ERP_lmer_Analysis/Step3_lmer analysis.zip/Step3_lmer analysis/P200/lmer_by_item_P200_forosf.RMD, lines 60 to 86 · score 0.66 · yielded singularity, initial model, lme4, slopes, ERP · Report a mismatch
  2. [2] § 3. Results › 3.1. By-Window ERP Analysis › 3.1.3. LPC ↔ Analysis/Step3_ERP_lmer_Analysis/Step3_lmer analysis.zip/Step3_lmer analysis/LPC/lmer_by_item_LPC_forOSF.Rmd, lines 228 to 251 · score 0.62 · scalp distribution, 500–900 ms, location, lmer, SE, CI · Report a mismatch
  3. [3] § 2. Materials and Methods › 2.2. Materials › 2.2.2. Norming ↔ Analysis/Additional analysis/Posttest scores analysis.zip/Posttest scores analysis/posttest scores analysis.Rmd, lines 28 to 43 · score 0.59 · emotionally moving, moral acceptance, moral scores, SD · Report a mismatch
  4. [4] § 2. Materials and Methods › 2.4. EEG Acquisition and Analysis ↔ Analysis/Step3_ERP_lmer_Analysis/Step3_lmer analysis.zip/Step3_lmer analysis/N400/lmer_byitem_N400_forOSF.Rmd, lines 78 to 103 · score 0.54 · random intercepts, lme4, singularity, slopes, model, ERP · Report a mismatch
  5. [5] § 2. Materials and Methods › 2.2. Materials › 2.2.2. Norming ↔ Analysis/Additional analysis/Norming_plausibility and moral accep scores ANOVA.zip/Norming_plausibility and moral accep scores ANOVA/norming plau and moral scores ANOVA.Rmd, lines 8 to 16 · score 0.50 · moral acceptance scores, norming, ANOVAs, plausibility · 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

R Markdown · 167 lines · 4 KB · no license · 1 match

  1. ---
  2. title: "lmer_by_item_P200"
  3. author: "Jian Meng"
  4. date: "`r Sys.Date()`"
  5. output: html_document
  6. ---
  7. ```{r}
  8. library(readr)
  9. library(lme4)
  10. library(lmerTest)
  11. library(tidyverse)
  12. library(hypr)
  13. library(dplyr)
  14. library(sjPlot)
  15. EEG_norming_prepost <- read_csv("z_EEG_norming_prepost_P200.csv")
  16. View(EEG_norming_prepost)
  17. dum <- EEG_norming_prepost
  18. ```
  19. ```{r region definition and averaging}
  20. frontal_electrodes<-c("FCz", "FC1", "FC2", "FC3", "FC4", "Cz", "C3", "C4")
  21. frontal <- dum %>%
  22. filter(chlabel %in% frontal_electrodes ) %>%
  23. filter(!Subject %in% c("7", "8", "22", "28", "37")) %>%
  24. group_by(Subject, Item_number, ConditionLabel, z_accep, z_moving) %>%
  25. summarize(Ampl=mean(Ampl)) %>%
  26. filter(Ampl!= 0)
  27. #View(frontal)
  28. ```
  29. ```{r making the contrast}
  30. contrasts1 <- hypr(
  31. Viol = (Mor+Sem)/2 ~ Neu,
  32. MorSem = Mor ~ Sem,
  33. levels = c("Mor", "Neu", "Sem")
  34. )
  35. contrasts1
  36. ```
  37. ```{r lmer analysis for n=33}
  38. frontal$Subject<- as.factor(frontal$Subject)
  39. frontal$Item_number<- as.factor(frontal$Item_number)
  40. frontal$ConditionLabel<- as.factor(frontal$ConditionLabel)
  41. contrasts(frontal$ConditionLabel) <- contr.hypothesis(contrasts1)
  42. # initial model, did not converge
  43. #model_full <-lmer(Ampl ~ ConditionLabel+(1+ConditionLabel|Subject)+(1+ConditionLabel|Item_number), data=frontal)
  44. #summary(model_full)
  45. # dropping by-item slopes; yielded singularity warning
  46. #model_full <-lmer(Ampl ~ ConditionLabel+(1+ConditionLabel|Subject)+(1|Item_number), data=frontal)
  47. #summary(model_full)
  48. # dropping by-subject slopes
  49. model_rint_only_frontal <-lmer(Ampl ~ ConditionLabel+(1|Subject)+ (1|Item_number), data=frontal)
  50. summary(model_rint_only_frontal)
  51. confint(model_rint_only_frontal, level = 0.95, method = "Wald")
  52. ```
  53. ## assessing the effect of keeping participant m11
  54. first a dataset without m11
  55. ```{r a model without m11}
  56. frontal_no11 <- dum %>%
  57. filter(chlabel %in% frontal_electrodes ) %>%
  58. filter(!Subject %in% c("7", "8", "22", "28", "37", "11")) %>%
  59. group_by(Subject, Item_number, ConditionLabel) %>%
  60. summarize(Ampl=mean(Ampl)) %>%
  61. filter(Ampl!= 0)
  62. #View(frontal_no11)
  63. ```
  64. ```{r lmer without m11}
  65. frontal_no11$Subject<- as.factor(frontal_no11$Subject)
  66. frontal_no11$Item_number<- as.factor(frontal_no11$Item_number)
  67. frontal_no11$ConditionLabel<- as.factor(frontal_no11$ConditionLabel)
  68. contrasts(frontal_no11$ConditionLabel) <- contr.hypothesis(contrasts1)
  69. model_rint_only_11 <-lmer(Ampl ~ ConditionLabel+(1|Subject)+ (1|Item_number), data=frontal_no11)
  70. summary(model_rint_only_11) # no significant difference from the model that includes m11
  71. ```
  72. ```{r influence of participant 11}
  73. library(influence.ME)
  74. # Calculate influence measures
  75. infl <- influence(model_rint_only_frontal, group = "Subject")
  76. # View influence diagnostics (DFBETAs, Cook's distance, etc.)
  77. summary(infl)
  78. plot(infl, which = "cook") # to visualize leverage
  79. db <- dfbetas(infl)
  80. which(levels(frontal$Subject) == "11") #11 is in 9th position
  81. db[9,] # Extracts the specific influence values for the 9th subject in the dataset
  82. #DFBETAs Threshold: 2 sqrt{n} = 2 sqrt{33} approx= 0.348.
  83. # Since no value is larger than |0.354|, Subject 11 is not exerting a significant pull on that specific estimate.
  84. ```
  85. ```{r output to wordfile-1}
  86. model_rint_only_frontal_output <- sjPlot::tab_model(model_rint_only_frontal,transform=NULL,
  87. show.est = TRUE,
  88. show.se = TRUE,
  89. show.ci = 0.95,
  90. show.stat = TRUE,
  91. show.icc = FALSE,
  92. show.re.var = TRUE,
  93. p.style = "numeric_stars",
  94. p.val = "wald",
  95. string.ci = "95% CI",
  96. string.est = "Estimate",
  97. string.se = "SE",
  98. string.stat = "t",
  99. string.pred = "Parameters",
  100. col.order = c("est","ci","se","stat","p"),
  101. dv.labels = "",
  102. pred.labels = c("Intercept","Neutral.v. Violation","Moral.v.Semantic"),
  103. emph.p = FALSE,
  104. ci.hyphen = ",",
  105. title = "P200 analysis",
  106. file = "P200.doc")
  107. model_rint_only_frontal_output
  108. ```

lmer_by_item_P200_forosf.RMD, no license · at the source

Overview

Authors: Jian Meng1, Demi Zhang1, Yuling Zhong2, Xiaodong Xu2, Edith Kaan1
  1. Department of Linguistics, University of Florida, Gainesville, FL 32611, USA; (J.M.); (D.Z.)
  2. School of Foreign Languages and Cultures, Nanjing Normal University, Nanjing 210098, (X.X.)
Institutions: University of Florida (United States); Nanjing Normal University (China)
Journal: Brain sciences, volume 16, issue 4, article 375
Dates: received 30 January 2026; accepted 27 March 2026; published online 30 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3390/brainsci16040375 · PMID 42041785 · PMCID PMC13115281 · OpenAlex W7143317388
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: EEG (modality)
Methods: Statistics, Smoothing, state filtering, decompositions, Preprocessing, Evoked potentials, Physiology & signal measures, Machine learning
Keywords: moral judgment, LPC, ERP, semantic violation, language processing
Topic: Psychology of Moral and Emotional Judgment (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 49 references in the paper

Abstract

Highlights: What is the main finding?

Encountering a moral violation while reading short texts elicits an earlier posterior positivity in the event-related brain potential response compared with semantic violations, which showed a descriptively more frontal positivity.

What is the implication of the main finding?

The findings support the view that the processing of moral deviations involves mechanisms that are partially different in nature and timing from those recruited for the processing of semantic oddities.

Abstract: Background/Objectives: The processing and evaluation of behavior, actions or events that go against social (moral) norms can be assumed to operate on mental representations of the world and of how people typically behave. These mechanisms and representations may therefore be shared by the processing of meaning in general. The current study investigated whether the processing of deviations of morality can be distinguished from processing of semantic inconsistencies. Methods: Event-related brain potentials (ERPs) were recorded from English speakers while they read short written texts in English for comprehension. Texts contained words that constituted moral violations, semantic violations and neutral controls depending on the context, allowing for a direct comparison. Results: Using trial-based analyses, we found different ERP responses to semantic and moral violations: the moral violation elicited a long-lasting, posterior Late Positive Component (LPC) starting at around 300 ms, whereas the semantic violation elicited a positivity that started later and was descriptively more frontally distributed. Furthermore, the LPC amplitudes could be explained by the moral acceptance scores over and above plausibility scores, but not vice versa. Conclusions: The outcomes are compatible with the view that the processing of moral deviations engages at least some mechanisms that are different from the processing of semantic deviations.

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 5 matches between paragraphs and lines of code.

OSF gquje

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Size: 22 files
Software Heritage: not checked
Found in: the text, “2.4. EEG Acquisition and Analysis”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (12 files), lme4 (5 files), lmerTest (5 files), ggplot2 (2 files), multcomp (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
12 files
At the source: osf.io/gquje

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;
  • 12 scripts, each with its path and the digest of its content;
  • 5 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 Statement

The original data presented in the study are openly available on the Open Science Framework at https://osf.io/gquje/ (accessed on 15 March 2026).

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, 5 authors, 5 keywords, 47 references.

Cite

This paper

Meng, J., Zhang, D., Zhong, Y., Xu, X., & Kaan, E. (2026). Comparing Brain Responses to Moral and Semantic Violations. Brain sciences, 16(4), 375. https://doi.org/10.3390/brainsci16040375

BibTeX

@article{meng2026comparing,
author = {Meng, Jian and Zhang, Demi and Zhong, Yuling and Xu, Xiaodong and Kaan, Edith},
title = {{Comparing Brain Responses to Moral and Semantic Violations}},
journal = {Brain sciences},
year = {2026},
month = mar,
volume = {16},
number = {4},
pages = {375},
publisher = {Multidisciplinary Digital Publishing Institute (MDPI)},
issn = {2076-3425},
doi = {10.3390/brainsci16040375},
url = {https://doi.org/10.3390/brainsci16040375},
pmid = {42041785},
pmcid = {PMC13115281}
}

RIS

TY - JOUR
AU - Meng, Jian
AU - Zhang, Demi
AU - Zhong, Yuling
AU - Xu, Xiaodong
AU - Kaan, Edith
TI - Comparing Brain Responses to Moral and Semantic Violations
T2 - Brain sciences
J2 - Brain Sci
PY - 2026
DA - 2026/03/30
VL - 16
IS - 4
SP - 375
SN - 2076-3425
PB - Multidisciplinary Digital Publishing Institute (MDPI)
DO - 10.3390/brainsci16040375
UR - https://doi.org/10.3390/brainsci16040375
LA - en
ER -

CSL-JSON

{
"id": "10.3390/brainsci16040375",
"type": "article-journal",
"title": "Comparing Brain Responses to Moral and Semantic Violations",
"container-title": "Brain sciences",
"author": [
{
"family": "Meng",
"given": "Jian"
},
{
"family": "Zhang",
"given": "Demi"
},
{
"family": "Zhong",
"given": "Yuling"
},
{
"family": "Xu",
"given": "Xiaodong"
},
{
"family": "Kaan",
"given": "Edith"
}
],
"container-title-short": "Brain Sci",
"volume": "16",
"issue": "4",
"page": "375",
"DOI": "10.3390/brainsci16040375",
"PMID": "42041785",
"PMCID": "PMC13115281",
"ISSN": "2076-3425",
"publisher": "Multidisciplinary Digital Publishing Institute (MDPI)",
"URL": "https://doi.org/10.3390/brainsci16040375",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
30
]
]
}
}

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.1111/nyas.15407 [code]
Foreign cultural norms are better accepted in the second language.
Journal: Annals of the New York Academy of Sciences
In common: lmerTest, lme4, ggplot2, 1 other tool, EEG, 9 references
[2] doi:10.3389/fnhum.2026.1820376 [code]
The neural dynamics of political socio-pragmatic violations: an ERP study.
Journal: Frontiers in human neuroscience
In common: lmerTest, lme4, ggplot2, 1 other tool, EEG, 5 references
[3] doi:10.1371/journal.pone.0353990 [code]
Positive mood enhances accessibility of unrelated concepts in the first language but not in the foreign language.
Journal: PloS one
In common: multcomp, lmerTest, lme4, 2 other tools, EEG, 5 references
[4] doi:10.1162/nol_a_00134 [code]
Tracking Lexical and Semantic Prediction Error Underlying the N400 Using Artificial Neural Network Models of Sentence Processing.
Journal: Neurobiology of language (Cambridge, Mass.)
In common: lmerTest, lme4, ggplot2, EEG, 5 references
[5] doi:10.1162/nol_a_00105 [code]
Strong Prediction: Language Model Surprisal Explains Multiple N400 Effects.
Journal: Neurobiology of language (Cambridge, Mass.)
In common: lmerTest, lme4, tidyverse, EEG, 5 references
[6] doi:10.1080/23273798.2024.2345302 [code]
Testing two-step models of negative quantification using a novel machine learning analysis of EEG.
Journal: Language, cognition and neuroscience
In common: lmerTest, lme4, ggplot2, 1 other tool, EEG, 4 references
[7] doi:10.1162/nol_a_00094 [code]
Understanding the Effects of Constraint and Predictability in ERP.
Journal: Neurobiology of language (Cambridge, Mass.)
In common: lme4, ggplot2, tidyverse, EEG, 5 references
[8] doi:10.1016/j.dcn.2023.101251 [code]
Age and vocabulary knowledge differentially influence the N400 and theta responses during semantic retrieval.
Journal: Developmental cognitive neuroscience
In common: multcomp, lmerTest, lme4, 2 other tools, EEG, 3 references
[9] doi:10.1162/opmi_a_00150 [code]
On the Mathematical Relationship Between Contextual Probability and N400 Amplitude.
Journal: Open mind : discoveries in cognitive science
In common: lmerTest, lme4, tidyverse, EEG, 4 references
[10] doi:10.1038/s41598-025-34117-w [code]
The impact of awareness on affective emoji priming in visual word recognition.
Journal: Scientific reports
In common: multcomp, lmerTest, lme4, 2 other tools, EEG, 2 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.3390/brainsci16040375.svg)](https://openscicode.org/badge/doi/10.3390/brainsci16040375)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.3390/brainsci16040375.svg
   :target: https://openscicode.org/badge/doi/10.3390/brainsci16040375
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.3390/brainsci16040375"><img src="https://openscicode.org/badge/doi/10.3390/brainsci16040375.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

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)

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