R/print_var_sel.R

Defines functions print.bsw_selection

#' @method print bsw_selection
#' @export
print.bsw_selection <- function(x, ...) {
  cat("\nFINALES MODELL:\n\n")

  summary(x$final_model, ...)

  if (length(x$skipped_models) > 0) {
    cat("\nThe following variables were skipped due to non-convergence or errors:\n")
    skipped_names <- names(x$skipped_models)
    cat(paste("- ", skipped_names, collapse = "\n"), "\n")
  }

  cat("\nStability Investigations:\n")
  cat("EPV (Events per Variable):", round(x$EPV, 2), "\n")

  if (!is.null(x$warnings) && any(nzchar(x$warnings))) {
    cat("\nWarnings:\n")
    cat(x$warnings, "\n")
  }


  invisible(x)
}

Try the BSW package in your browser

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

BSW documentation built on Nov. 5, 2025, 6:26 p.m.