OSCR

Regretting a chance to connect: How neural responses to missed social opportunities predict self-disclosure.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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 · 166 lines · 8 KB · no license

  1. ## LOADING PACKAGES
  2. # library(lme4) # mlm
  3. library(nlme)
  4. library(lmerTest) # mlm stats
  5. library(performance) # mlm icc
  6. library(interactions) # mlm
  7. library(r2mlm) # mlm
  8. library(ggplot2) # data visualization
  9. library(ggstatsplot) # data visualization
  10. library(ggeffects) # data visualization
  11. library(psych) # describe data
  12. library(dplyr) # data wrangling
  13. library(tidyverse) # data wrangling
  14. library(reshape2) # data reshaping
  15. library(plyr)
  16. library(expss)
  17. library(DescTools)
  18. library(cowplot) # plot annotation
  19. library(emmeans)
  20. library(interactions)
  21. library(lavaan)
  22. library(multcomp)
  23. ## LOADING
  24. disc_df <- read.csv('/Users/seh-jookwon/Documents/Rutgers/Projects/SocialConnections/3-analysis/for-osf/disc1-avg.csv',header=T)
  25. disc <- disc_df
  26. disc2_df <- read.csv('/Users/seh-jookwon/Documents/Rutgers/Projects/SocialConnections/3-analysis/for-osf/disc2-trial-level.csv',header=T)
  27. disc2 <- disc2_df
  28. disc3_df <- read.csv('/Users/seh-jookwon/Documents/Rutgers/Projects/SocialConnections/3-analysis/for-osf/disc3-trial-level-regret-only.csv',header=T)
  29. disc3 <- disc3_df
  30. disc4_df <- read.csv('/Users/seh-jookwon/Documents/Rutgers/Projects/SocialConnections/3-analysis/for-osf/disc4-trial-level-closeness-only.csv',header=T)
  31. disc4 <- disc4_df
  32. disc5_df <- read.csv('/Users/seh-jookwon/Documents/Rutgers/Projects/SocialConnections/3-analysis/for-osf/disc5-intimacy.csv',header=T)
  33. disc5 <- disc5_df
  34. --------------------------------------------------------------------------------
  35. ## DESCRIPTIVE STATS
  36. # share vs. hide (behav. differences)
  37. svh <- t.test(disc$Share_Prop, mu = 0.5, alternative = "greater")
  38. svh
  39. # share vs. hide (reaction time differences)
  40. rt <- t.test(disc$Share_RT, disc$Hide_RT, paired = TRUE)
  41. rt
  42. --------------------------------------------------------------------------------
  43. ## QUESTION 1
  44. # Q1A: does closeness increase across trials?
  45. summary(q1a <- lme(Closeness ~ Trial + Version,
  46. data = disc4,
  47. random = ~ Trial|id,
  48. method = "ML",
  49. control= lmeControl(opt = "optim", maxIter = 200, msMaxIter = 200,
  50. niterEM = 50, msMaxEval = 400, msVerbose = FALSE),
  51. na.action = na.exclude))
  52. # saving each person's rate of change in closeness
  53. coef <- coef(q1a)
  54. # does rate of change in closeness predict later cooperation behavior (in prisoner's dilemma)?
  55. summary(coop <- lm(Share_Prop ~ ClosenessRate,data = disc))
  56. # Q1B: closeness development + number of various interaction types (share-share, share-hide, hide-share, hide-hide)
  57. summary(int_close <- lm(ClosenessRate ~ HS_Count,data = disc))
  58. --------------------------------------------------------------------------------
  59. ## QUESTION 2
  60. # Q2A: how interaction type predicts subsequent decision-making
  61. # model has singularity issues if interaction type is added as a random effect
  62. disc2$Int_Type <- as.factor(disc2$Int_Type)
  63. summary(q2a <- glmer(Share_Next ~ Int_Type + (1 | id),
  64. data = disc2, family = binomial, nAGQ=1, na.action = na.omit,
  65. control = glmerControl(optimizer = "bobyqa",optCtrl=list(maxfun=2e5))))
  66. # posthoc (pairwise comparisons)
  67. contrasts_q2a <- rbind("hs-sh" = c(0,-1,1,0),
  68. "hh-sh"= c(0,-1,0,1),
  69. "hh-hs"= c(0,0,-1,1))
  70. summary(glht(q2a,contrasts_q2a),test=adjusted("bonferroni"))
  71. # Q2B: the effect of interaction type on subsequent decision-making across trials
  72. summary(q2b <- glmer(Share_Next ~ Int_Type*Trial + (1 | id),
  73. data = disc2, family = binomial, nAGQ=1, na.action = na.omit,
  74. control = glmerControl(optimizer = "bobyqa",optCtrl=list(maxfun=2e5))))
  75. # posthoc (simple effects)
  76. contrasts_q2b <- rbind("sh_trial"= c(0,0,0,0,1,1,0,0),
  77. "hs_trial" = c(0,0,0,0,1,0,1,0),
  78. "hh_trial"= c(0,0,0,0,1,0,0,1))
  79. summary(glht(q2b,contrasts_q2b),test=adjusted("bonferroni"))
  80. # posthoc (pairwise comparisons)
  81. contrasts_q2b_trial <- rbind("sh_trial-hs_trial"= c(0,0,0,0,0,1,-1,0),
  82. "sh_trial-hh_trial" = c(0,0,0,0,0,1,0,-1),
  83. "hs_trial-hh_trial"= c(0,0,0,0,0,0,1,-1))
  84. summary(glht(q2b,contrasts_q2b_trial),test=adjusted("bonferroni"))
  85. --------------------------------------------------------------------------------
  86. ## QUESTION 3
  87. # Q3A: regret across interaction types
  88. disc3$Int_Type <- as.factor(disc3$Int_Type)
  89. q3a <- lmer(Regret ~ Int_Type + (1 | Subject), data = disc3)
  90. summary(q3a)
  91. # posthoc (pairwise comparisons)
  92. emm <- emmeans(q3a, ~ Int_Type)
  93. pairs(emm, adjust = "bonferroni")
  94. # Q3B: regret + subsequent behavioral change
  95. summary(q3b <- glmer(Behav_Change_Next ~ Regret + (1 | id),
  96. data = disc2, family = binomial, nAGQ=1, na.action = na.omit,
  97. control = glmerControl(optimizer = "bobyqa",optCtrl=list(maxfun=2e5))))
  98. summary(q3b_2 <- glmer(Behav_Change_Next ~ Regret + (1 + Regret | id),
  99. data = disc2, family = binomial, nAGQ=1, na.action = na.omit,
  100. control = glmerControl(optimizer = "bobyqa",optCtrl=list(maxfun=2e5))))
  101. # picking the best-fit model (q3b_2 is better!)
  102. anova(q3b,q3b_2)
  103. # whether the effect of regret on behavioral changes depend on the context / interaction type
  104. summary(q3b_3 <- glmer(Behav_Change_Next ~ Regret*Int_Type + (1 + Regret | id),
  105. data = disc2, family = binomial, nAGQ=1, na.action = na.omit,
  106. control = glmerControl(optimizer = "bobyqa",optCtrl=list(maxfun=2e5))))
  107. # posthoc (pairwise comparisons)
  108. contrasts_q3b <- rbind("sh-hs"= c(0,0,0,0,0,1,-1,0),
  109. "sh-hh" = c(0,0,0,0,0,1,0,-1),
  110. "hs-hh"= c(0,0,0,0,0,0,1,-1))
  111. summary(glht(q3b_3,contrasts_q3b),test=adjusted("bonferroni"))
  112. --------------------------------------------------------------------------------
  113. ## EXPLORATORY: intimacy
  114. # behavioral differences
  115. explor1.1 <- t.test(disc$Share_High_Prop,disc$Share_Low_Prop,paired=TRUE)
  116. explor1.1
  117. # reaction time differences
  118. explor1.2 <- lmer(AvgRT ~ Intimacy*Decision + (1 | Subject), data = disc5)
  119. summary(explor1.2)
  120. # regret differences
  121. explor1.3 <- t.test(disc$Regret_High,disc$Regret_Low,paired=TRUE)
  122. explor1.3
  123. --------------------------------------------------------------------------------
  124. ## EXPLORATORY: interaction type -> behavioral change
  125. summary(explor2.1 <- glmer(Behav_Change_Next ~ Int_Type + (1 | id),
  126. data = disc2, family = binomial, nAGQ=1, na.action = na.omit,
  127. control = glmerControl(optimizer = "bobyqa",optCtrl=list(maxfun=2e5))))
  128. # posthoc (pairwise comparisons)
  129. contrasts_explor2.1 <- rbind("hs-sh" = c(0,-1,1,0),
  130. "hh-sh"= c(0,-1,0,1),
  131. "hh-hs"= c(0,0,-1,1))
  132. summary(glht(explor2.1,contrasts_explor2.1),test=adjusted("bonferroni"))
  133. --------------------------------------------------------------------------------
  134. ## EXPLORATORY: brain + behavior links
  135. # mpfc + dmpfc estimates -> trial-level likelihood of sharing
  136. summary(explor3.1 <- glmer(Participant_Decision ~ SS_MPFC_Z + SH_MPFC_Z + HS_MPFC_Z + HH_MPFC_Z + (1 | id),
  137. data = disc2, family = binomial, nAGQ=1, na.action = na.omit,
  138. control = glmerControl(optimizer = "bobyqa",optCtrl=list(maxfun=2e5))))
  139. # mpfc + dmpfc estimates -> trial-level likelihood of sharing
  140. summary(explor3.2 <- glmer(Participant_Decision ~ SS_LPSTS_Z + SH_LPSTS_Z + HS_LPSTS_Z + HH_LPSTS_Z + (1 | id),
  141. data = disc2, family = binomial, nAGQ=1, na.action = na.omit,
  142. control = glmerControl(optimizer = "bobyqa",optCtrl=list(maxfun=2e6))))
  143. --------------------------------------------------------------------------------
  144. ## EXPLORATORY: linking disclosure task + willingness-to-pay task
  145. disc <- disc %>% mutate(value = WTP_Share_Hide_Partner - WTP_Share_Hide_Stranger)
  146. summary(explor4.1 <- lm(value ~ SS_MPFC_Z + SH_MPFC_Z + HS_MPFC_Z + HH_MPFC_Z,data = disc))
  147. summary(explor4.2 <- lm(value ~ SS_LPSTS_Z + SH_LPSTS_Z + HS_LPSTS_Z + HH_LPSTS_Z,data = disc))

disclosure.R, no license · at the source

Overview

Authors: Seh-Joo Kwon1, Casey M Nicastri1, Jamil P Bhanji1, Mauricio R Delgado1
  1. Department of Psychology, Rutgers University—Newark, 101 Warren St, Newark, NJ 07103, USA
Institutions: Rutgers, The State University of New Jersey (United States)
Journal: PNAS nexus, volume 5, issue 5, article pgag138
Dates: received 17 December 2025; accepted 8 April 2026; published online 24 April 2026
Type: Research article · Language: English
License: CC BY-NC
Identifiers: DOI 10.1093/pnasnexus/pgag138 · PMID 42137770 · PMCID PMC13168892 · OpenAlex W7155524348
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: fMRI (modality), human (organism), cognitive (subfield)
Methods: fMRI & imaging
Keywords: fMRI, information valuation, regret, self-disclosure, social connection
Journal subjects: Social and Political Sciences, Psychological and Cognitive Sciences
Topic: Attachment and Relationship Dynamics (Social Psychology, Psychology), according to OpenAlex
Funding: National Institutes of Health (R01DA053311)
Citations: not cited yet (Europe PMC); 42 references in the paper

Abstract

Humans value communicating information about themselves to others, and exchanges of such information between two individuals are fundamental to social bond formation. Yet, people often keep information private, potentially forfeiting the chance to connect with someone new. In this preregistered functional MRI study, participants who experienced more missed social opportunities in an iterative self-disclosure task—or instances where withholding information was met with an ostensible partner's self-disclosure—tended to feel closer to this partner faster. Missed social opportunities were regrettable and most likely followed by a change in subsequent decisions, making participants switch from withholding to sharing their information. Using conjunction analysis, activities in the medial prefrontal cortex and posterior superior temporal sulcus (pSTS), regions implicated in social-cognitive processes, were greater in response to missed social opportunities than in response to other social interactions (e.g. mutual self-disclosure). Notably, greater pSTS responses to missed social opportunities were linked to a higher likelihood of disclosing to a partner, as well as a higher amount of money willing to be spent to disclose to a partner in a follow-up task, highlighting the role of the pSTS in predicting a sustained interest in the new partner. Our findings elucidate the neurobiological, affective, and behavioral attributes of forgone moments of connection that contribute to interpersonal closeness development. We further identify context-dependent pSTS activities that support closeness-generating behaviors like self-disclosure.

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

Repository

Its files are read in the Code ↔ Paper reader above.

OSF yxtwb

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Languages: R (1)
Size: 8 files, 1 script
Software Heritage: not checked
Found in: “Data Availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: cowplot (1 file), easystats (1 file), emmeans (1 file), ggplot2 (1 file), lavaan (1 file), lmerTest (1 file), multcomp (1 file), nlme (1 file), psych (1 file), reshape2 (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)
1 file
At the source: osf.io/yxtwb/

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;
  • 1 script, 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

Datasets cited

Data Availability

The preregistration, de-identified behavioral data, and data analyses codes are available on OSF (https://osf.io/yxtwb/). Whole-brain group-level contrasts are available on Neurovault (https://neurovault.org/collections/21797/).

Reproduced under the paper's license (CC BY-NC), 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, 29 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 5 keywords, 1 funder, 31 references.

Cite

This paper

Kwon, S.-J., Nicastri, C. M., Bhanji, J. P., & Delgado, M. R. (2026). Regretting a chance to connect: How neural responses to missed social opportunities predict self-disclosure. PNAS nexus, 5(5), pgag138. https://doi.org/10.1093/pnasnexus/pgag138

BibTeX

@article{kwon2026regretting,
author = {Kwon, Seh-Joo and Nicastri, Casey M and Bhanji, Jamil P and Delgado, Mauricio R},
title = {{Regretting a chance to connect: How neural responses to missed social opportunities predict self-disclosure}},
journal = {PNAS nexus},
year = {2026},
month = apr,
volume = {5},
number = {5},
pages = {pgag138},
publisher = {Oxford University Press},
issn = {2752-6542},
doi = {10.1093/pnasnexus/pgag138},
url = {https://doi.org/10.1093/pnasnexus/pgag138},
pmid = {42137770},
pmcid = {PMC13168892}
}

RIS

TY - JOUR
AU - Kwon, Seh-Joo
AU - Nicastri, Casey M
AU - Bhanji, Jamil P
AU - Delgado, Mauricio R
TI - Regretting a chance to connect: How neural responses to missed social opportunities predict self-disclosure
T2 - PNAS nexus
J2 - PNAS Nexus
PY - 2026
DA - 2026/04/24
VL - 5
IS - 5
SP - pgag138
SN - 2752-6542
PB - Oxford University Press
DO - 10.1093/pnasnexus/pgag138
UR - https://doi.org/10.1093/pnasnexus/pgag138
LA - en
ER -

CSL-JSON

{
"id": "10.1093/pnasnexus/pgag138",
"type": "article-journal",
"title": "Regretting a chance to connect: How neural responses to missed social opportunities predict self-disclosure",
"container-title": "PNAS nexus",
"author": [
{
"family": "Kwon",
"given": "Seh-Joo"
},
{
"family": "Nicastri",
"given": "Casey M"
},
{
"family": "Bhanji",
"given": "Jamil P"
},
{
"family": "Delgado",
"given": "Mauricio R"
}
],
"container-title-short": "PNAS Nexus",
"volume": "5",
"issue": "5",
"page": "pgag138",
"DOI": "10.1093/pnasnexus/pgag138",
"PMID": "42137770",
"PMCID": "PMC13168892",
"ISSN": "2752-6542",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/pnasnexus/pgag138",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
24
]
]
}
}

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-023-04953-5 [code]
Sulcal morphology of posteromedial cortex substantially differs between humans and chimpanzees.
Journal: Communications biology
In common: multcomp, lavaan, nlme, 8 other tools, cognitive
[2] doi:10.1007/s00429-022-02539-1 [code]
Presence or absence of a prefrontal sulcus is linked to reasoning performance during child development.
Journal: Brain structure & function
In common: multcomp, lavaan, nlme, 8 other tools
[3] doi:10.1093/brain/awaf302 [code]
Parkinson's disease progression is shaped by longitudinal changes in cerebral compensation.
Journal: Brain : a journal of neurology
In common: multcomp, lavaan, easystats, 7 other tools, fMRI, 1 reference
[4] doi:10.1093/brain/awad325 [code]
Clinical severity in Parkinson's disease is determined by decline in cortical compensation.
Journal: Brain : a journal of neurology
In common: multcomp, lavaan, easystats, 7 other tools, fMRI, 1 reference
[5] doi:10.1038/s41593-024-01672-w [code]
Cognitive control training with domain-general response inhibition does not change children's brains or behavior.
Journal: Nature neuroscience
In common: multcomp, lavaan, easystats, 7 other tools, cognitive
[6] 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, nlme, easystats, 7 other tools
[7] doi:10.1038/s41366-023-01370-w [code]
A randomized controlled trial investigating the effect of liraglutide on self-reported liking and neural responses to food stimuli in participants with obesity.
Journal: International journal of obesity (2005)
In common: multcomp, lavaan, easystats, 6 other tools, 1 reference
[8] doi:10.1038/s41467-025-55830-0 [code]
Pregnancy entails a U-shaped trajectory in human brain structure linked to hormones and maternal attachment.
Journal: Nature communications
In common: multcomp, lavaan, nlme, 6 other tools
[9] doi:10.1162/imag_a_00312 [code]
Alpha-band fluctuations represent behaviorally relevant excitability changes as a consequence of top-down guided spatial attention in a probabilistic spatial cueing design.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: multcomp, lavaan, easystats, 6 other tools, cognitive
[10] doi:10.1038/s41598-024-64054-z [code]
Cortical processes of multisensory plausibility modulation of vibrotactile perception in virtual environments in middled-aged and older adults.
Journal: Scientific reports
In common: multcomp, nlme, easystats, 6 other tools, cognitive

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.1093/pnasnexus/pgag138.svg)](https://openscicode.org/badge/doi/10.1093/pnasnexus/pgag138)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1093/pnasnexus/pgag138.svg
   :target: https://openscicode.org/badge/doi/10.1093/pnasnexus/pgag138
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1093/pnasnexus/pgag138"><img src="https://openscicode.org/badge/doi/10.1093/pnasnexus/pgag138.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.