Thresholdanalysis: an R package for detecting and visualizing threshold effects in logistic regression, linear regression, and cox proportional hazards models

Abstract When a dependent variable exceeds a certain threshold, a significant change in its magnitude and/or direction is called a threshold effect. As a statistical tool, threshold effect analysis can predict the occurrence, development, and prognosis of a disease, which is highly important. However, there is currently a lack of open-source, free, simple, and effective tools to implement threshold effect analysis. The process of determining thresholds is complex and labor intensive, requiring high programming skills. Therefore, this study demonstrates how to simplify this process and reduce programming skill requirements via the self-developed R package “thresholdanalysis”, which enables nonstatistical professionals to conduct threshold effect analysis. First, smooth curve fitting is used to observe whether there is a nonlinear relationship between the dependent variable and the independent variable. If a threshold is visually observed, the maximum likelihood method, recursive method, piecewise linear model, and likelihood ratio test are used to determine the threshold, the effect sizes before and after the threshold, and whether the effect sizes of the two segments are significant.

Authors

Publication Details

Journal
Scientific Reports
Published
2026-09-25
DOI
https://doi.org/10.1038/s41598-026-62994-2
Primary Topic
Data Analysis with R
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
article

Thresholdanalysis: an R package for detecting and visualizing threshold effects in logistic regression, linear regression, and cox proportional hazards models

Zhang Yan-Hong, Zhang Lei, Sheng Song, Huang Ye et al.
Scientific Reports
Data Analysis with R
article

Thresholdanalysis: an R package for detecting and visualizing threshold effects in logistic regression, linear regression, and cox proportional hazards models

Zhang Yan-Hong, Zhang Lei, Sheng Song, Huang Ye, Ma Hang-Kun, Zhao Yang
article en

Abstract

Abstract When a dependent variable exceeds a certain threshold, a significant change in its magnitude and/or direction is called a threshold effect. As a statistical tool, threshold effect analysis can predict the occurrence, development, and prognosis of a disease, which is highly important. However, there is currently a lack of open-source, free, simple, and effective tools to implement threshold effect analysis. The process of determining thresholds is complex and labor intensive, requiring high programming skills. Therefore, this study demonstrates how to simplify this process and reduce programming skill requirements via the self-developed R package “thresholdanalysis”, which enables nonstatistical professionals to conduct threshold effect analysis. First, smooth curve fitting is used to observe whether there is a nonlinear relationship between the dependent variable and the independent variable. If a threshold is visually observed, the maximum likelihood method, recursive method, piecewise linear model, and likelihood ratio test are used to determine the threshold, the effect sizes before and after the threshold, and whether the effect sizes of the two segments are significant.

Scientific ReportsVol. 16(1)
Decent work and economic growth
Openalex Percentile: Top 9%
Data Analysis with R
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.