A method of compensating for the excitability of spinal motoneurones when estimating the magnitude of potentials evoked in skeletal muscles.
The 11 matches
- [1] § Results and analyses › Generation of adjusted MEP amplitudes ↔ annotated_QR_example_code.R, lines 53–93 · score 0.90 · vertical position, uncertainty concerning, intercept coincides, variation inherent, uncertainty increases, predictor variable
- [2] § Results and analyses › Implementation using quantile regression ↔ annotated_QR_example_code.R, lines 1–51 · score 0.90 · samples conform, quantreg package, constant variance, linear combination, squares regression, quantile regression
- [3] § Results and analyses › Generation of adjusted MEP amplitudes ↔ annotated_LSR_example_code.R, lines 95–134 · score 0.87 · vertical position, intercept coincides, variation inherent, uncertainty increases, predictor variable, linear regression model
- [4] § Results and analyses › Generation of adjusted MEP amplitudes ↔ annotated_LSR_example_code.R, lines 42–93 · score 0.80 · idealised scenario, necessarily equates, linear relationship, amplitude accounts, original MEP, contingent
- [5] § Results and analyses › Generation of adjusted MEP amplitudes ↔ annotated_QR_example_code.R, lines 53–93 · score 0.80 · idealised scenario, necessarily equates, linear relationship, amplitude accounts, original MEP, contingent
- [6] § Results and analyses › Generation of adjusted MEP amplitudes ↔ annotated_QR_example_code.R, lines 1–51 · score 0.78 · unadjusted residuals, negative residual, residual indicates, linear regression model, affords, smaller
- [7] § Results and analyses › Generation of adjusted MEP amplitudes ↔ annotated_LSR_example_code.R, lines 42–93 · score 0.78 · unadjusted residuals, negative residual, residual indicates, linear regression model, affords, smaller
- [8] § Results and analyses › Generation of adjusted MEP amplitudes ↔ annotated_LSR_example_code.R, lines 95–134 · score 0.74 · varies inversely, relative weighting, residuals differs, intercept tends, accuracy, infinity
- [9] § Results and analyses › Generation of adjusted MEP amplitudes ↔ annotated_QR_example_code.R, lines 95–133 · score 0.74 · varies inversely, relative weighting, residuals differs, intercept tends, accuracy, infinity
- [10] § Results and analyses › Compensation for the association ↔ LSR_example_code.R, lines 1–40 · score 0.57 · symmetric heavy tailed, LambertW, hh, skewed, Gaussianise, transformation
- [11] § Results and analyses › Compensation for the association ↔ annotated_LSR_example_code.R, lines 1–40 · score 0.57 · symmetric heavy tailed, LambertW, hh, skewed, Gaussianise, transformation
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 · 191 lines · 9.7 KB · CC-BY-4.0 · 5 matches
- #!/usr/bin/Rscript --slave
- # annotated_QR_example_code.R
- # 5th May 2026
- # Modified: 5th May 2026
- # Author: Richard G. Carson ([email hidden])
- #################
- # Read the data file
- data <- read.csv("example_data.csv", header=TRUE, stringsAsFactors=FALSE)
- # Ensure data are numeric
- data["mep_amplitude"] <- as.numeric(unlist(data["mep_amplitude"]))
- data["rms_emg"] <- as.numeric(unlist(data["rms_emg"]))
- ###################################
- # Whereas least-squares regression (LSR) estimates the conditional mean as a linear
- # combination of the predictors, quantile regression (QR) estimates a conditional quantile
- # function (such as the 0.5 quantile, i.e., the median) as a linear combination of the
- # predictors.
- # Unlike least squares regression, QR does not entail an assumption that the outcome
- # variable has constant variance or that samples conform to a particular parametric
- # distribution. It is also robust to the presence of outliers. It was implemented here
- # by means of the rq() function from the quantreg package (Koenker, 2022).
- # The “tau” parameter was specified as 0.5, indicating that the conditional quantile
- # for the median was to be used.
- ###################################
- library(quantreg)
- # Estimate the quantile regression model for the median (tau = 0.5)
- qr_model <- rq(mep_amplitude ~ rms_emg, data = data, tau = 0.5)
- # Generate residuals
- data$qr_residuals <- qr_model$residuals
- ###################################
- # A positive value of a residual indicates that an estimate of MEP amplitude is larger
- # than that which would be predicted by r.m.s. EMG alone – to an extent corresponding
- # to its magnitude. A negative residual value indicates an estimate of MEP amplitude
- # that is smaller than would be predicted for the r.m.s. EMG recorded in the period
- # preceding the stimulation.
- # The use of the unadjusted residuals as the basis for further analysis is however
- # limited by the fact that for a given sample the sum of the residuals necessarily tends
- # to zero. It is therefore desirable that the residuals are expressed relative
- # to an appropriate reference value.
- # The parameters of the linear regression model used to generate each set of residuals
- # affords a means of addressing this requirement.
- ###################################
- ###################################
- # Extract key information from the fitted model
- # y = mx + c
- # y - c = mx
- # (y-c)/m = x
- # m = lm.mod_Ch5$coeff[["rms_emg"]]
- # c = lm.mod_Ch5$coeff[["(Intercept)"]]
- qr.mod_slope <- qr_model$coeff[["rms_emg"]]
- qr.mod_intercept <- qr_model$coeff[["(Intercept)"]]
- ###################################
- ###################################
- # In an idealised scenario in which a linear relationship between r.m.s. EMG and MEP
- # amplitude accounts for 100% of the variance present in the data, the appropriate
- # reference is obtained as the value of the intercept (i.e., with the ordinate (y) axis).
- # This corresponds to the predicted value of the MEP amplitude when the r.m.s. EMG is
- # equal to zero. In this idealised case, the adjusted MEP amplitudes for the sample are
- # simply obtained by adding the value of the intercept to each of the residuals.
- # If there is no relationship between r.m.s. EMG and MEP amplitude, the best estimate
- # for all values of r.m.s. EMG is the central tendency of the original MEP amplitude
- # values.
- # That is. if the slope of the regression line is equal to zero, the reference value is
- # provided by the central tendency of the actual values (which necessarily equates to the
- # central tendency of the predicted values and, in this specific case only, to the value
- # of the intercept).
- # Thus, the extent to which the appropriate reference value differs from the central
- # tendency of the actual values is contingent on the slope of the regression line.
- # With respect to real data however, a linear model will not typically account for
- # all variation inherent to the sample. The use of a linear regression model
- # dictates that there is no uncertainty about the estimated slope at the central tendency
- # of the “predictor” variable (the r.m.s. EMG in the present instance). Even though
- # prediction will also be most precise at the estimate of central tendency, there will
- # nonetheless be some uncertainty concerning the true vertical position of the regression
- # line at this point.
- # The degree of uncertainty increases with separation from the centre of the distribution
- # of the predictor variable. That is, unless the value of the intercept coincides with
- # the value of the estimate of central tendency, the standard error of the ordinate at
- # the intercept will always be larger than the standard error of the ordinate at the
- # central tendency of the “predictor” variable.
- # Since the standard error of the estimate is a measure of the accuracy of prediction,
- # we wish to accord to the intercept (in its contribution to the generation of a
- # reference value) a weighting that varies inversely with its standard error.
- # Specifically, as the standard error of the estimate at the intercept tends to infinity,
- # the contribution of the intercept to the generation of a reference value should tend
- # towards zero. As noted above, as the slope of the regression line approaches zero,
- # the reference value derived from the intercept will converge upon that of the central
- # tendency of the original values. Accordingly, therefore, the relative weighting of the
- # intercept should also be such that, with increases in its standard error, the reference
- # value converges on the central tendency. In summary, the extent to which the reference
- # value used to adjust the residuals differs from the central tendency of the
- # predicted/actual values, will depend on the slope of the regression line and the
- # uncertainty with which its intercept can be estimated.
- ###################################
- ###################################
- # Determine the value of x (i.e., the r.m.s. EMG) that corresponds to
- # the median of the predicted values.
- qr_predicted_values <- fitted(qr_model)
- qr_predicted_median <- median(qr_predicted_values)
- qr_rms_emg_at_median <- (qr_predicted_median - qr_model$coeff[["(Intercept)"]] )/qr_model$coeff[["rms_emg"]]
- # Determine the "quasi" standard error of the fit when the y value (MEP amplitude)
- # is predicted by means of the qr model when the x value (r.m.s. EMG)
- # is that at which the median of the predicted values is obtained.
- qr_predict_at_median <- predict(qr_model, newdata=data.frame(rms_emg = qr_rms_emg_at_median), interval = "confidence")
- qr_predict_at_median_ci <- qr_predict_at_median[1,"higher"] - qr_predict_at_median[1,"lower"]
- # As confidence intervals (i.e., 95%) for prediction are reported by the rq() function
- # rather than standard errors, the values were first converted to the equivalent
- # standard errors
- qr_predict_at_median_SE <- qr_predict_at_median_ci / qnorm(0.975)
- # Determine the "quasi" standard error of the fit when the y value (MEP amplitude)
- # is predicted by means of the linear model when the x value (r.m.s. EMG)
- # is equal to zero, i.e. the intercept.
- qr_predict_at_intercept <- predict(qr_model, newdata=data.frame(rms_emg=0.0), interval = "confidence")
- qr_predict_at_intercept_ci <- qr_predict_at_intercept[1,"higher"] - qr_predict_at_intercept[1,"lower"]
- # As confidence intervals (i.e., 95%) for prediction are reported by the rq() function
- # rather than standard errors, the values were first converted to the equivalent
- # standard errors
- qr_predict_at_intercept_SE <- qr_predict_at_intercept_ci / qnorm(0.975)
- # Calculate the sum of the SE for the predicted value of y at the median and at the
- # intercept.
- qr_predict_at_median_AND_intercept_SE_sum <- qr_predict_at_median_SE + qr_predict_at_intercept_SE
- # Express the SE for the predicted value of y at the median and at the intercept as a
- # proportion of the sum.
- qr_predict_at_median_proportion <- qr_predict_at_median_SE / qr_predict_at_median_AND_intercept_SE_sum
- qr_predict_at_intercept_proportion <- qr_predict_at_intercept_SE / qr_predict_at_median_AND_intercept_SE_sum
- # Calculate median weighting and weighted values
- qr_median_weight <- (qr_predict_at_intercept_SE/qr_predict_at_median_AND_intercept_SE_sum) - (qr_predict_at_median_SE/qr_predict_at_median_AND_intercept_SE_sum)
- qr_median_weighted_value <- qr_median_weight * qr_predicted_median
- # Calculate intercept weighting and weighted values
- qr_intercept_weight <- (1 - (qr_predict_at_intercept_SE/qr_predict_at_median_AND_intercept_SE_sum)) + (qr_predict_at_median_SE/qr_predict_at_median_AND_intercept_SE_sum)
- qr_intercept_weighted_value <- qr_intercept_weight * qr.mod_intercept
- # Generate final estimate of the reference value
- qr_weighted_reference_amplitude <- qr_median_weighted_value + qr_intercept_weighted_value
- # Add the final estimate to the residuals generated using the quantile regression
- data$qr_adjusted_mep_amplitude <- qr_model$residuals + qr_weighted_reference_amplitude
- detach("package:quantreg")
- ###################################
- ###################################
- # Write the data to an .xlsx format file
- ###################################
- # load the openxlsx package
- library(openxlsx)
- # In order to permit data to be written to an .xlsx file, create a workbook
- wbOut<-createWorkbook()
- # Add worksheets to the workbook object
- addWorksheet(wbOut, "adjusted")
- # Write the summarised data to the workbook object
- writeData(wbOut, "adjusted", data, startCol = 1, startRow = 1, xy = NULL, colNames = TRUE, rowNames = FALSE, headerStyle = NULL, keepNA = TRUE)
- # Save the summary data workbook - overwriting the original file (if it exists)
- saveWorkbook(wbOut, "example_data_qr_adjusted.xlsx", overwrite = TRUE)
- detach("package:openxlsx")
- ###################################
annotated_QR_example_code.R, under CC-BY-4.0 · at the source
Overview
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.
Repository
Its files are read in the Code ↔ Paper reader above, with 11 matches between paragraphs and lines of code.
Zenodo 20037178
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
4 files
- LSR_example_code.R, R, 132 lines, 1 match
- QR_example_code.R, R, 113 lines
- annotated_LSR_example_co
de.R , R, 191 lines, 5 matches - annotated_QR_example_cod
e.R , R, 191 lines, 5 matches
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;
- 4 scripts, each with its path and the digest of its content;
- 11 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.
Code and data availability statement
The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: Zenodo 20037178
Read it in the paper: doi.org/10.1113/jp290979.
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
- Publisher: n/a → Wiley
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 1 author, 6 keywords, 10 MeSH terms, 67 references.
Cite
This paper
Carson, R. G. (2026). A method of compensating for the excitability of spinal motoneurones when estimating the magnitude of potentials evoked in skeletal muscles. The Journal of physiology, 604(14), 5731-5757. https://
BibTeX
@article{carson2026metho
author = {Carson, Richard G.},
title = {{A method of compensating for the excitability of spinal motoneurones when estimating the magnitude of potentials evoked in skeletal muscles}},
journal = {The Journal of physiology},
year = {2026},
month = jun,
volume = {604},
number = {14},
pages = {5731--5757},
publisher = {Wiley},
issn = {0022-3751},
doi = {10.1113/
url = {https://
pmid = {42260716},
pmcid = {PMC13370687}
}
RIS
TY - JOUR
AU - Carson, Richard G.
TI - A method of compensating for the excitability of spinal motoneurones when estimating the magnitude of potentials evoked in skeletal muscles
T2 - The Journal of physiology
J2 - J Physiol
PY - 2026
DA - 2026/
VL - 604
IS - 14
SP - 5731
EP - 5757
SN - 0022-3751
PB - Wiley
DO - 10.1113/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1113/
"type": "article-journal",
"title": "A method of compensating for the excitability of spinal motoneurones when estimating the magnitude of potentials evoked in skeletal muscles",
"container-title": "The Journal of physiology",
"author": [
{
"family": "Carson",
"given": "Richard G."
}
],
"container-title-short":
"volume": "604",
"issue": "14",
"page": "5731-5757",
"DOI": "10.1113/
"PMID": "42260716",
"PMCID": "PMC13370687",
"ISSN": "0022-3751",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
8
]
]
}
}
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.1162/imag.a.1211 [code]
- Effects of electric field direction on TMS-based motor cortex mapping.Journal: Imaging neuroscience (Cambridge, Mass.)In common: other, 3 references
- [2] doi:10.1186/s12916-026-04978-7 [code]
- Mapping shared and specific cortical after-effects of repetitive TMS on brain function.Journal: BMC medicineIn common: other, 3 references
- [3] doi:10.1093/cercor/bhag041
- Pain suppresses corticospinal excitability, independent of tactile afferent inhibition.Journal: Cerebral cortex (New York, N.Y. : 1991)In common: other, 3 references
- [4] doi:10.1162/imag.a.1356
- Sources of the N15 TMS-evoked potential following motor cortex stimulation localize rostrals to TMS-induced electric fields and depend on dose.Journal: Imaging neuroscience (Cambridge, Mass.)In common: other, 3 references
- [5] doi:10.1111/ejn.70659 [code]
- Premovement Suppression of Corticospinal Excitability Is Modulated by Reaction Time Task Requirements.Journal: The European journal of neuroscienceIn common: other, 2 references
- [6] doi:10.1162/imag.a.1345
- Causal evidence for dorsal stream involvement in object shape recognition: A tractography-guided ccPAS Registered Report study.Journal: Imaging neuroscience (Cambridge, Mass.)In common: 3 references
- [7] doi:10.1007/s00221-026-07391-x
- Six weeks of isometric resistance training led to evidence of corticospinal but not reticulospinal adaptation in previously untrained adult males.Journal: Experimental brain researchIn common: other, 2 references
- [8] doi:10.1111/ejn.70597
- Superficial Ventral Premotor Pathways to Primary Motor Cortex Shape the Temporal Coordination of Precision Graspinnog.Journal: The European journal of neuroscienceIn common: other, 2 references
- [9] doi:10.1159/000552942 [code]
- How Standardized Is Transcranial Magnetic Stimulation Treatment for Depression? Large-Cohort Modeling Reveals Systematic Dosimetric Variability.Journal: Psychotherapy and psychosomaticsIn common: other, 2 references
- [10] doi:10.3390/brainsci16050530
- Transcranial Magnetic Stimulation over the Left Inferior Parietal Lobule Facilitates Early-Stage Processing During Natural Chinese-English Bilingual Reading.Journal: Brain sciencesIn common: other, 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.
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: 1 repository of the authors' code, each at its verified commit and with its license, 4 scripts, and 11 matches 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:c7ed17df7521ae66…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[.
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.
