RGS: Recursive Gradient Scanning Algorithm

Provides a recursive gradient scanning algorithm for discretizing continuous variables in Logistic and Cox regression models. This algorithm is especially effective in identifying optimal cut-points for variables with U-shaped relationships to 'lnOR' (the natural logarithm of the odds ratio) or 'lnHR' (the natural logarithm of the hazard ratio), thereby enhancing model fit, interpretability, and predictive power. By iteratively scanning and calculating gradient changes, the method accurately pinpoints critical cut-points within nonlinear relationships, transforming continuous variables into categorical ones. This approach improves risk classification and regression analysis performance, increasing interpretability and practical relevance in clinical and risk management settings.

Getting started

Package details

AuthorShuo Yang [aut, cre], Yi Fei [aut], Jinxin Zhang [ths]
MaintainerShuo Yang <yangsh223@mail2.sysu.edu.cn>
LicenseMIT + file LICENSE
Version1.0
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("RGS")

Try the RGS package in your browser

Any scripts or data that you put into this service are public.

RGS documentation built on April 4, 2025, 1:08 a.m.