Date: 2025-10-30

# StepRegShiny: A shiny Application for StepReg

Junhui Li1, Kai Hu1, Xiaohuan Lu2 and Lihua Julie Zhu1

1University of Massachusset Chan Medical School, Worcester, USA
2Clark University, Worcester, USA

#### 30 October 2025

#### Abstract

Stepwise regression is commonly used for model selection, but the absence of a unified tool supporting diverse regression types, selection strategies, and metrics has complicated its effective application. Notably, most existing tools lack built-in robust methods to address issues like invalid statistical inference and overfitting. We present StepReg, an R package designed to streamline stepwise regression analysis while promoting best practices. StepReg is a comprehensive tool that accommodates multiple regression types and incorporates commonly used selection strategies and metrics. It allows users to combine selection strategies and metrics for efficient model selection. The package offers a randomized forward selection option to avoid overfitting and a data-splitting option to adress potential issues with invalid statistical inference. Additionally, it includes functions for visualizing the selection process and exporting results in multiple formats. To ensure accuracy, StepReg was validated against public datasets using SAS, and an interactive Shiny application is included to enhance usability. This vignette provides numerous examples for model development in diverse contexts.

#### Package

StepRegShiny 1.6.1

# 1 Interactive app

We have developed an interactive Shiny application to simplify model selection tasks for non-programmers. You can access the app through the following URL:

https://junhuili1017.shinyapps.io/StepRegShiny/

You can also access the Shiny app directly from your local machine with the following code:

    library(StepRegShiny)
    StepRegGUI()

Here is the user interface.

# 2 Session info

    R version 4.4.1 (2024-06-14)
    Platform: x86_64-apple-darwin20
    Running under: macOS Sonoma 14.6

    Matrix products: default
    BLAS:   /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRblas.0.dylib
    LAPACK: /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

    locale:
    [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

    time zone: America/New_York
    tzcode source: internal

    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base

    other attached packages:
    [1] BiocStyle_2.32.1

    loaded via a namespace (and not attached):
     [1] digest_0.6.37       R6_2.6.1            bookdown_0.43
     [4] fastmap_1.2.0       xfun_0.52           cachem_1.1.0
     [7] knitr_1.50          htmltools_0.5.8.1   rmarkdown_2.29
    [10] lifecycle_1.0.4     cli_3.6.5           sass_0.4.10
    [13] jquerylib_0.1.4     compiler_4.4.1      rstudioapi_0.17.1
    [16] tools_4.4.1         evaluate_1.0.3      bslib_0.9.0
    [19] yaml_2.3.10         BiocManager_1.30.25 jsonlite_2.0.0
    [22] rlang_1.1.6