Defines S3 generic functions for model comparison, coefficient summaries, goodness-of-fit tables, equation extraction, random-effects summaries, diagnostic plots, variable selection, and methods reporting. Model-specific implementations are supplied by packages that extend these interfaces, allowing a consistent workflow across regression models.

The regcore package defines S3 generic functions used by regression packages to provide model comparison, coefficient summaries, goodness-of-fit tables, diagnostics, random-effects summaries, and methods reporting. It does not fit regression models or implement statistical tests by itself. Class-specific methods are defined by packages that extend these interfaces.
| Purpose | Functions |
|---|---|
| Model comparison and selection | vuong_test(), pairwise_vuong_test(), stepCriterion() |
| Model summaries | summary_coef(), extract_equations(), random_effects() |
| Goodness-of-fit and diagnostics | gof_tab(), plot_envelope(), df_envelopes(), plot_ranef() |
| Methods reporting | write_methods() |
install.packages("remotes")
remotes::install_github("rpetterle/regcore")
Other R packages can implement methods for their fitted-model classes. The following example illustrates S3 method dispatch using only base R:
library(regcore)
fit <- structure(list(aic = 12.5), class = "demo_regression")
gof_tab.demo_regression <- function(object, ...) data.frame(AIC = object$aic)
gof_tab(fit)
In a package that imports regcore, register the methods through the downstream package's own NAMESPACE (for example by using roxygen2 @export on the class-specific method). Refer to each generic's help page with ?gof_tab or ?summary_coef.
GPL (>= 3).