| Title: | Transparent and Assisted Linear Modeling Engine |
| Version: | 1.0.0 |
| Description: | A transparent, modular, and base-R implemented statistical engine for linear regression (OLS), analysis of variance (ANOVA), and logistic regression (Logit). Designed under the principle of "assisted simplicity", it features an integrated methodological "customs" (Aduana) that automatically audits mathematical assumptions (e.g., multicollinearity, heteroskedasticity, normality, and perfect separation) and outputs publication-ready, APA-formatted tables. It deliberately avoids hidden heuristics and external dependencies, ensuring computational transparency and reproducibility for applied research. |
| License: | MIT + file LICENSE |
| URL: | https://github.com/msoto-perez/OLSEngine |
| BugReports: | https://github.com/msoto-perez/OLSEngine/issues |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| VignetteBuilder: | knitr |
| Suggests: | knitr, rmarkdown |
| NeedsCompilation: | no |
| Packaged: | 2026-05-10 13:12:55 UTC; msoto |
| Author: | Manuel Soto-Pérez [aut, cre] |
| Maintainer: | Manuel Soto-Pérez <msoto@up.edu.mx> |
| Repository: | CRAN |
| Date/Publication: | 2026-05-14 09:10:07 UTC |
Transparent and Assisted Linear Modeling Engine
Description
Estimates OLS regression, ANOVA/t-tests, or binary logistic regression models using pure base R matrix algebra. Automatically audits statistical assumptions through an integrated methodological customs layer and returns publication-ready APA-formatted tables. Designed for applied researchers and early-career academics who need a single, transparent workflow from estimation to reporting.
Usage
paper_engine(
formula,
data,
model = "ols",
robust = FALSE,
non_parametric = FALSE,
paired = FALSE,
digits = 2
)
Arguments
formula |
A |
data |
A data frame containing all variables referenced in |
model |
A character string indicating the estimation engine.
One of |
robust |
Logical or |
non_parametric |
Logical or |
paired |
Logical. If |
digits |
Integer. Number of decimal places in output tables.
Default is |
Value
An object of class basic_model, which is a list containing:
- tables
A list of formatted data frames with estimation results.
- diagnostics
A list of raw diagnostic statistics (p-values, fit indices).
- messages
A character vector of methodological guidance messages from the customs layer.
- method
A character string indicating the engine used (
"ols","anova", or"logit").- data
The cleaned data frame used for estimation (after listwise deletion).
Examples
# OLS example
set.seed(42)
df <- data.frame(y = rnorm(100), x1 = rnorm(100), x2 = rnorm(100))
result <- paper_engine(y ~ x1 + x2, data = df, model = "ols")
print(result$tables)
print(result$messages)
# ANOVA example
df2 <- data.frame(score = c(rnorm(30, 5), rnorm(30, 7)),
group = rep(c("A", "B"), each = 30))
result2 <- paper_engine(score ~ group, data = df2, model = "anova")
print(result2$tables)
# Logit example
df3 <- data.frame(y = rbinom(100, 1, 0.5), x = rnorm(100))
result3 <- paper_engine(y ~ x, data = df3, model = "logit")
print(result3$tables)
Generate Publication-Ready Plots for Basic Models
Description
Produces minimalist APA-style plots from a basic_model
object returned by paper_engine. The plot type is selected
automatically based on the estimation method: a forest plot of coefficients
with 95% CI for OLS, a group means plot with 95% CI error bars for ANOVA,
and a logistic probability curve for logistic regression.
Usage
plot_engine(model_object, y_label = NULL, x_label = NULL)
Arguments
model_object |
An object of class |
y_label |
A character string for the Y-axis label. If |
x_label |
A character string for the X-axis label. If |
Value
A base R plot rendered in the active graphics device. The function
is called for its side effect (the plot) and returns NULL invisibly.
Examples
set.seed(42)
df <- data.frame(y = rnorm(100), x1 = rnorm(100), x2 = rnorm(100))
result <- paper_engine(y ~ x1 + x2, data = df, model = "ols")
plot_engine(result, y_label = "Outcome", x_label = "Predictors")