OSCR

Calibration of MRI-based reference intervals to new samples.

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] § Methods › Reference interval calibration via conformal prediction (ReForm) ↔ R/reform.R, lines 1–71 · score 0.71 · conFormal, calibration constants, reference interval calibration, ReFormed, CQR, Ri

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

R · 183 lines · 6 KB · no license · 1 match

  1. #' Reference interval calibration via conFormal prediction (ReForm)
  2. #'
  3. #' `reform` takes a fitted reference interval and calibrates to a new sample
  4. #' using split conformalized quantile regression (Romano, et al., 2019).
  5. #' `reform` requires a calibration set `caldata` from the new sample. For more
  6. #' details on calibration set size and ReForm properties, refer to our preprint
  7. #' Chen et al., 2025.
  8. #'
  9. #' @param object `refint` object obtained from \link[ReForm]{refint}
  10. #' @param caldata calibration data used to fit ReForm
  11. #' @param ... additional arguments passed internally to \link[stats]{predict}
  12. #'
  13. #' @returns `reform` returns a list containing all elements of `object` (see \link[ReForm]{refint}) and:
  14. #' \item{cali}{lower and upper calibration constants used to adjust the interval}
  15. #' \item{cali.df}{`caldata` stored in the output}
  16. #' @export
  17. #'
  18. #' @seealso
  19. #' \link[ReForm]{plot.reformint} for assessing fit of reference interval in
  20. #' calibration set via diagnostic plots
  21. #'
  22. #' \link[ReForm]{predict.reformint} for applying a ReFormed reference
  23. #' interval to new observations
  24. #'
  25. #' @examples
  26. #' # example for lm (not recommended)
  27. #' ri <- refint(
  28. #' lm(Sepal.Length ~ Sepal.Width,
  29. #' data = iris[51:100,]), pct = 90
  30. #' )
  31. #' predict(ri, newdata = iris[1:10,])
  32. #' reformed_ri <- reform(ri, caldata = iris[11:50,])
  33. #' predict(reformed_ri, newdata = iris[1:10,])
  34. #'
  35. #' # example for quantreg::rq
  36. #' if (require("quantreg")) {
  37. #' ri <- refint(
  38. #' rq(Sepal.Length ~ Sepal.Width,
  39. #' data = iris[51:100,], tau = 0.05),
  40. #' rq(Sepal.Length ~ Sepal.Width,
  41. #' data = iris[51:100,], tau = 0.95)
  42. #' )
  43. #' reformed_ri <- reform(ri, caldata = iris[11:50,])
  44. #' predict(reformed_ri, newdata = iris[1:10,])
  45. #' }
  46. #'
  47. #' @references
  48. #' Romano, Y., Patterson, E., & Candes, E. (2019). Conformalized quantile regression. Advances in neural information processing systems, 32.
  49. reform <- function(object, caldata, ...) {
  50. if (any(!(object$terms %in% names(caldata)))) {
  51. stop("Terms missing from caldata")
  52. }
  53. alpha = 1 - object$pct/100
  54. nc <- nrow(caldata)
  55. # calibrate using CQR
  56. pred <- object$get.ri(caldata)
  57. res <- data.frame(lower = pred[[1]] - caldata[,object$terms[1]],
  58. upper = caldata[,object$terms[1]] - pred[[2]])
  59. if (ceiling((1 - alpha/2)*(nc+1)) > nc) {
  60. warning("Calibration set size is inadequate, results may be suboptimal")
  61. }
  62. q_cut <- min(ceiling((1 - alpha/2)*(nc+1)), nc)
  63. q <- apply(res, 2, function(x) sort(x)[q_cut])
  64. out <- object
  65. out$cali <- q
  66. out$cali.df <- caldata
  67. class(out) <- "reformint"
  68. out
  69. }
  70. #' Predict Method for ReFormed Reference Intervals
  71. #'
  72. #' Apply ReFormed reference interval from \link[ReForm]{reform} to new data
  73. #'
  74. #' @param object `reformint` object obtained from \link[ReForm]{reform}
  75. #' @param newdata input variables used to get reference intervals
  76. #' @param ... additional arguments passed to \link[stats]{predict}
  77. #'
  78. #' @returns a data frame containing lower and upper bounds of the reference
  79. #' interval, the test observation, and logicals for whether it is above or below
  80. #'
  81. #' @export
  82. #'
  83. #' @examples
  84. #' # example for lm (not recommended)
  85. #' ri <- refint(
  86. #' lm(Sepal.Length ~ Sepal.Width,
  87. #' data = iris[51:100,]), pct = 90
  88. #' )
  89. #' reformed_ri <- reform(ri, caldata = iris[11:50,])
  90. #' predict(reformed_ri, newdata = iris[1:10,])
  91. #'
  92. #' # example for quantreg::rq
  93. #' if (require("quantreg")) {
  94. #' ri <- refint(
  95. #' rq(Sepal.Length ~ Sepal.Width,
  96. #' data = iris[51:100,], tau = 0.05),
  97. #' rq(Sepal.Length ~ Sepal.Width,
  98. #' data = iris[51:100,], tau = 0.95)
  99. #' )
  100. #' reformed_ri <- reform(ri, caldata = iris[11:50,])
  101. #' predict(reformed_ri, newdata = iris[1:10,])
  102. #' }
  103. predict.reformint <- function(object, newdata, ...) {
  104. if (any(!(object$terms %in% names(newdata)))) {
  105. stop("Terms missing from newdata")
  106. }
  107. # apply ReForm calibration
  108. out <- object$get.ri(newdata, ...)
  109. out$lower <- out$lower - object$cali[1]
  110. out$upper <- out$upper + object$cali[2]
  111. out[[object$terms[1]]] <- newdata[,object$terms[1]]
  112. out$below <- newdata[,object$terms[1]] < out$lower
  113. out$above <- newdata[,object$terms[1]] > out$upper
  114. data.frame(out)
  115. }
  116. #' Diagnostic Plots for ReForm
  117. #'
  118. #' Plot upper and lower residuals from the calibration set in
  119. #' \link[ReForm]{reform} against a chosen variable `var`. Ideally, both plots
  120. #' should display a roughly flat relationship.
  121. #'
  122. #' @param x `reformint` object obtained from \link[ReForm]{reform}
  123. #' @param var string indicating to plot against variable to plot against (should
  124. #' be in `x$terms`). If none supplied, defaults to the first covariate (second
  125. #' value) in `x$terms`.
  126. #' @param ... additional arguments passed to \link[base]{plot}
  127. #'
  128. #' @export
  129. #'
  130. #' @examples
  131. #' # example for lm (not recommended)
  132. #' ri <- refint(
  133. #' lm(Sepal.Length ~ Sepal.Width,
  134. #' data = iris[51:100,]), pct = 90
  135. #' )
  136. #' reformed_ri <- reform(ri, caldata = iris[11:50,])
  137. #' plot(reformed_ri)
  138. #'
  139. #' # example for quantreg::rq
  140. #' if (require("quantreg")) {
  141. #' ri <- refint(
  142. #' rq(Sepal.Length ~ Sepal.Width,
  143. #' data = iris[51:100,], tau = 0.05),
  144. #' rq(Sepal.Length ~ Sepal.Width,
  145. #' data = iris[51:100,], tau = 0.95)
  146. #' )
  147. #' reformed_ri <- reform(ri, caldata = iris[11:50,])
  148. #' plot(reformed_ri)
  149. #' }
  150. plot.reformint <- function(x, var = NULL, ...) {
  151. if (is.null(var)) {
  152. var <- x$terms[2]
  153. }
  154. pred <- x$get.ri(x$cali.df)
  155. res <- data.frame(lower = pred[[1]] - x$cali.df[,x$terms[1]],
  156. upper = x$cali.df[,x$terms[1]] - pred[[2]])
  157. plot(x$cali.df[,var], res$lower, xlab = var, ylab = "lower residual")
  158. op <- par(ask=TRUE)
  159. plot(x$cali.df[,var], res$upper, xlab = var, ylab = "upper residual")
  160. par(op)
  161. }
  162. #' @export
  163. print.reformint <- function(x) {
  164. if (is.null(x$fits)) {
  165. cat(x$pct, "% ReFormed reference interval using model of class ",
  166. class(x$fit), ", calibrated on ", nrow(x$cali.df), " observations\n",
  167. sep = "")
  168. } else {
  169. cat(x$pct, "% ReFormed reference interval using models of class ",
  170. class(x$fits[[1]]), ", calibrated on ", nrow(x$cali.df),
  171. " observations\n", sep = "")
  172. }
  173. }

reform.R at commit 93e11ef, no license · at the source

Overview

13 affiliations
  1. Department of Public Health Sciences, Medical University of South Carolina, Charleston, SC, United States
  2. Brain-Gene-Development Lab, The Children’s Hospital of Philadelphia and Penn Medicine, Philadelphia, PA, United States
  3. Lifespan Brain Institute, The Children’s Hospital of Philadelphia and Penn Medicine, Philadelphia, PA, United States
  4. Department of Psychiatry, University of Pennsylvania, Philadelphia, PA, United States
  5. Department of Child and Adolescent Psychiatry and Behavioral Science, The Children’s Hospital of Philadelphia, Philadelphia, PA, United States
  6. Neuroscience Graduate Group, Perelman School of Medicine, University of Pennsylvania, Philadelphia, PA, United States
  7. Department of Psychology, University of Cambridge, Cambridge, United Kingdom
  8. Department of Neurology, Medical University of South Carolina, Charleston, SC, United States
  9. Department of Neuroscience, Medical University of South Carolina, Charleston, SC, United States
  10. Department of Biostatistics, Vanderbilt University, Nashville, TN, United States
  11. Department of Psychiatry, Perelman School of Medicine, University of Pennsylvania, Philadelphia, PA, United States
  12. The Penn Lifespan Informatics and Neuroimaging Center, Department of Psychiatry, Perelman School of Medicine, University of Pennsylvania, Philadelphia, PA, United States
  13. For the Lifespan Brain Chart Consortium
Institutions: Medical University of South Carolina (United States); Children's Hospital of Philadelphia (United States); University of Pennsylvania Health System (United States); University of Pennsylvania (United States); University of Cambridge (United Kingdom); Vanderbilt University (United States)
Journal: Imaging neuroscience (Cambridge, Mass.), volume 4, article IMAG.a.1290
Dates: received 10 December 2025; accepted 8 June 2026; published online 10 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/imag.a.1290 · PMID 42444711 · PMCID PMC13358719 · OpenAlex W4416686716
Open access: diamond, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), Alzheimer's / dementia (population), methods / tools (subfield)
Methods: Connectivity, Statistics, Machine learning, Preprocessing
Keywords: reference intervals, brain charts, structural MRI, cortical thickness, Alzheimer’s disease
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: NIMH NIH HHS (R01 MH113550, R37 MH125829, R01 MH112847, R01 MH120482, R01 MH133843, R01 MH123550); NIA NIH HHS (R01 AG054159)
Citations: not cited yet (Europe PMC); 54 references in the paper

Abstract

Reference intervals, defined as intervals containing a new observation with a specified probability relative to reference data, would be clinically useful in assessing brain magnetic resonance imaging (MRI). Brain charts, which are estimates of MRI phenotypes across covariates such as age and sex, can be used to construct reference intervals. However, the reference data used to fit intervals often differ from a new sample in terms of study design, MRI acquisition, and image preprocessing. Application of MRI reference intervals to new samples remains a challenging problem. Here, we propose a new method called reference interval calibration via conFormal prediction (ReForm) that adjusts reference intervals for a new sample. Our method builds on recent work in conformal prediction, which yields intervals with guaranteed coverage for new observations. Through resampling experiments in Lifespan Brain Chart Consortium cortical thickness data, we compare ReFormed reference intervals with refitting intervals, statistical harmonization methods, and model-based adjustment of intervals. Notably for patient privacy concerns, ReForm does not require sharing of reference data. Yet, our empirical results demonstrate that ReForm controls FPR similarly or better than alternative methods that require sharing reference data. Finally, we provide recommendations for practical applications of ReForm and an R package (https://github.com/andy1764/ReForm) for calibrating reference intervals using ReForm.

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 1 match between paragraphs and lines of code.

andy1764/ReForm

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 93e11ef67dca61372ce27e78fa1edd0680fce54b, 1 December 2025
Languages: R (2)
Size: 13 files, 2 scripts
Software Heritage: not archived
Found in: the text, “Reference interval calibration via conformal pre”
Holds: README, environment (DESCRIPTION), documentation
Not found: license file, CITATION.cff, tests, continuous integration
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
3 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;
  • 2 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

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

Data and Code Availability

An R implementation of the proposed method, ReForm, is available via GitHub (https://github.com/andy1764/ReForm). Data used in this work were from the Lifespan Brain Chart Consortium (LBCC), which includes multiple publicly available MRI datasets. Our work included three datasets, each with their own data access and sharing policies, which can be accessed via the following websites: The Alzheimer’s Disease Repository Without Borders (ARWiBo, https://www.arwibo.it); Open Access Series of Imaging Studies (OASIS, https://sites.wustl.edu/oasisbrains/); and the National Alzheimer’s Coordinating Center (NACC, https://naccdata.org/).

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, 27 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 11 authors, 5 keywords, 2 funders, 49 references.

Cite

This paper

Chen, A. A., Seidlitz, J., Gardner, M., Bethlehem, R. A., Dorfschmidt, L., Kafadar, E., Benitez, A., Jensen, J. H., Vandekar, S., Satterthwaite, T. D., & Alexander-Bloch, A. F. (2026). Calibration of MRI-based reference intervals to new samples. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1290. https://doi.org/10.1162/imag.a.1290

BibTeX

@article{chen2026calibration,
author = {Chen, Andrew A and Seidlitz, Jakob and Gardner, Margaret and Bethlehem, Richard AI and Dorfschmidt, Lena and Kafadar, Eren and Benitez, Andreana and Jensen, Jens H and Vandekar, Simon and Satterthwaite, Theodore D and Alexander-Bloch, Aaron F},
title = {{Calibration of MRI-based reference intervals to new samples}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = jul,
volume = {4},
pages = {IMAG.a.1290},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/imag.a.1290},
url = {https://doi.org/10.1162/imag.a.1290},
pmid = {42444711},
pmcid = {PMC13358719}
}

RIS

TY - JOUR
AU - Chen, Andrew A
AU - Seidlitz, Jakob
AU - Gardner, Margaret
AU - Bethlehem, Richard AI
AU - Dorfschmidt, Lena
AU - Kafadar, Eren
AU - Benitez, Andreana
AU - Jensen, Jens H
AU - Vandekar, Simon
AU - Satterthwaite, Theodore D
AU - Alexander-Bloch, Aaron F
TI - Calibration of MRI-based reference intervals to new samples
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/07/10
VL - 4
SP - IMAG.a.1290
SN - 2837-6056
PB - MIT Press
DO - 10.1162/imag.a.1290
UR - https://doi.org/10.1162/imag.a.1290
LA - en
ER -

CSL-JSON

{
"id": "10.1162/imag.a.1290",
"type": "article-journal",
"title": "Calibration of MRI-based reference intervals to new samples",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Chen",
"given": "Andrew A"
},
{
"family": "Seidlitz",
"given": "Jakob"
},
{
"family": "Gardner",
"given": "Margaret"
},
{
"family": "Bethlehem",
"given": "Richard AI"
},
{
"family": "Dorfschmidt",
"given": "Lena"
},
{
"family": "Kafadar",
"given": "Eren"
},
{
"family": "Benitez",
"given": "Andreana"
},
{
"family": "Jensen",
"given": "Jens H"
},
{
"family": "Vandekar",
"given": "Simon"
},
{
"family": "Satterthwaite",
"given": "Theodore D"
},
{
"family": "Alexander-Bloch",
"given": "Aaron F"
}
],
"container-title-short": "Imaging Neurosci (Camb)",
"volume": "4",
"page": "IMAG.a.1290",
"DOI": "10.1162/imag.a.1290",
"PMID": "42444711",
"PMCID": "PMC13358719",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/imag.a.1290",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
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.1002/hbm.70546 [code]
ComBat-Predict Enhances Generalizability of Neuroimaging Models to New Sites.
Journal: Human brain mapping
In common: Alzheimer's / dementia, structural MRI / diffusion, 11 references, 3 authors
[2] doi:10.1038/s41593-026-02289-x [code]
Cerebellar aging is spatially heterogeneous and supports cognitive resilience in later life.
Journal: Nature neuroscience
In common: Alzheimer's / dementia, structural MRI / diffusion, 1 reference, 3 authors
[3] doi:10.1038/s41467-026-73714-9 [code]
The genetic architecture of cortical similarity networks.
Journal: Nature communications
In common: structural MRI / diffusion, 2 authors
[4] doi:10.1038/s41586-026-10454-2 [code]
White matter micro- and macrostructure brain charts for the human lifespan.
Journal: Nature
In common: 3 references, author Simon Vandekar
[5] doi:10.1038/s41467-026-72875-x [code]
Lifespan normative modeling of brain microstructure.
Journal: Nature communications
In common: Alzheimer's / dementia, structural MRI / diffusion, 6 references
[6] doi:10.7554/elife.103097 [code]
Canonical neurodevelopmental trajectories of structural and functional manifolds.
Journal: eLife
In common: structural MRI / diffusion, 3 references, author Richard Bethlehem
[7] doi:10.1002/hbm.70493 [code]
Testing for Network Specificity in Brain-Behavior Associations Using Ordinal Dominance Curves.
Journal: Human brain mapping
In common: 3 references, author Simon Vandekar
[8] doi:10.1162/imag.a.1338 [code]
Systematic fMRI signal differences across cohorts alter lifespan trajectories of functional brain networks.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: 5 references
[9] doi:10.1093/brain/awaf443 [code]
Cellular signatures underlying functional resilience in presymptomatic frontotemporal dementia.
Journal: Brain : a journal of neurology
In common: Alzheimer's / dementia, 1 reference, author Richard Bethlehem
[10] doi:10.1162/imag.a.1352 [code]
Brain-age in ultra-low-field MRI: How well does it work?
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: methods / tools, structural MRI / diffusion, 4 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.