stepwise() call and candidate models are evaluated on column subsets of it (R/fastUtils.R) instead of refitting a complete lm()/glm() per candidate and step.
glm.fit() on the prebuilt matrix; with metric = "SL" the Rao score test for entry is computed from the current fit alone (as anova.glm() does) and the Wald test for removal from the current coefficient table (as summary.glm() does), so no candidate refits are needed.metric = "SL" is fitted once instead of once per subset size.tests/testthat/test_fast_path.R) compares the new evaluators with the refitting path, which can still be forced with options(StepReg.fast = FALSE). The refitting path is used automatically for Cox and negative binomial models, weighted linear models, data with missing values, multivariate responses with metric = "SL", and factor codings that depend on the terms in the model.pROC from Imports; the AUC in performance() is computed internally (Mann-Whitney form, identical to the trapezoidal ROC AUC). AUC values below 0.5 are now reported as such instead of being flipped by pROC::roc(direction = "auto"), and the performance data frame stores plain numbers instead of pROC objects.flextable from Imports to Suggests; it is only used by report(), which now stops with an installation hint when the package is missing.survAUC::AUC.uno() and AUC.hc() calls in the Cox performance summary (only auc_sh was ever reported); survAUC is still imported for AUC.sh().sigma_value and adjusted R-squared were weighted. The weighted residual sum of squares (the deviance, as SAS does with a WEIGHT statement) is now used, with n counting the observations with non-zero weight; metric = "SL" and "adjRsq" were already weighted and are unchanged.metric = "SL" failed for strategy = "forward"/"bidirection" ("incorrect number of dimensions"). The entry test is now a Rao score test with theta held at its estimate in the current model (test_method_glm = "Rao") or the likelihood ratio test of MASS::anova.negbin() ("LRT").which.max() on statistics that anova(candidate, current) reports with a negative sign, so the weakest candidate of all was chosen; with two strong predictors forward selection could stop at the intercept-only model. The tie is now broken by the largest test statistic among the tied candidates.feature_ratio = 1, stepwise() still called sample() at every step, which permuted the candidates (results in tied cases depended on the random number generator state) and advanced the user's random number generator. Candidates are now sampled only when feature_ratio < 1.stepwise() fail with "replacement has ... rows".c-index_test for Cox models was computed with the wrong direction (concordance() without reverse = TRUE) and reported 1 minus the correct value.accuracy_test for logistic models used inverted class labels (ifelse(p > 0.5, 0, 1)).metric = "SL" and strategy = "backward"/"bidirection" no longer fails ("subscript out of bounds"); the Wald test uses t-based p-values as summary.glm() does for families with an estimated dispersion.?data.frame call from R/stepwiseUtils.R.StepRegShinyApp() function and all Shiny-related dependenciesinst/shiny/ directory and all Shiny application filesUsers who were using the Shiny application should now install the separate StepRegShiny package:
# Install the new Shiny package
install.packages("StepRegShiny")
# Use the Shiny application
StepRegShiny::StepRegGUI()
The core StepReg functionality remains unchanged. Only the Shiny interface has been moved to a separate package for better modularity and independent development.
Strata Variables for Cox Regression: Added support for strata() function in Cox regression formulas. This allows users to fit stratified Cox models where separate baseline hazard functions are estimated for different groups while sharing regression coefficients across strata.
Continuous-Nested-Within-Class Effects: Added support for continuous-nested-within-class effects using the : operator in formulas. This allows modeling how continuous variables' effects vary across different levels of categorical variables.
train and test validation: this feature is used for valid inference when test_ratio is set between 0-1.
feature ratio: Proportion of candidate features sampled uniformly at random during forward selection (default = 1). This randomized selection helps identify the best variables while reducing the risk of overfitting, and is only valid when strategy is "forward"..
X:A vs A:X)