Enhanced Teaching Assistant (AI) for Statistical Analysis
Overview
An assistant built on large language models that helps interpret statistical model outputs in R by generating concise, audience-specific explanations.
_First major release._
This version consolidates the API, improves robustness for **FactoMineR** outputs, and harmonizes audience-tailored prompts across all functions.
Major Changes & New Features
Unified Architecture (“Hub & Spoke”)
All trainer functions now rely on a centralized core (trainer_core.R) for consistent **prompt building**, **audience profiling**, **output capture**, and **regex/quoting helpers**. Any update to the core instantly benefits all trainers.
New Trainers
trainer_t_test()— Interpret Student’s t-tests (one-sample, two-sample, paired, Welch) with audience-aware guidance on **p-values vs confidence intervals**.trainer_cor_test()— Interpret correlation tests (**Pearson**, **Spearman**, **Kendall**) with clear distinction between **statistical significance** and **practical magnitude**.trainer_var_test()— Interpret F-tests for equality of variances.
Robust ANOVA & Linear Model Support
trainer_AovSum()andtrainer_LinearModel()use **centralized heuristics** (trainer_core_extract_tables_heuristic) to reliably extract **F-test** and **T-test** tables even when standard headers are missing (common withcapture.output).- **Strict, space-safe T-table filtering**: factor names with spaces or special characters are handled via core quoting (
trainer_core_quote) and detection helpers.
Show all changes in 1.0.0Hide the rest of the changes in 1.0.0
Gemini Integration
gemini_generate()enables direct interaction with Google’s **Gemini** API.- Includes **automatic retry with exponential backoff** and clear error surfacing (finish reasons, safety blocks).
- Adds
compile_to = "html"andcompile_to = "docx"to directly **render LLM responses into reports**.
Improvements
Pedagogy & Interpretability
- **PCA/MCA**: Prompts explicitly guide interpretation of **correlation signs (PCA)** and **category positions (MCA)** to prevent hallucinations.
- **ANOVA**: “How-to-read” blocks clarify **deviation coding (sum-to-zero)**; the **Intercept is the Grand Mean**.
- **t-test**: Clear separation between **Inference** (p-value) and **Magnitude** (effect size/mean difference) in prompts.
Developer Experience
- Internal helpers for **regex, capture, quoting** centralized for DRY code.
- Improved error messages when input objects are
NULLor of the wrong class. - Audience sections standardized (BEGINNER/APPLIED/ADVANCED) with consistent limits (e.g., **Takeaway ≤ 5 bullets**).
Bug Fixes
- Fixed duplication of
extract_section/header-loss issues by using the shared core heuristic and single re-attachment of T-table headers after filtering. - Fixed potential regex failures with factor names containing spaces in
trainer_AovSum. - Removed unnecessary
stringrdependency in examples.
---
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 25
- Examples that run
- 86%19 run in a plain check (2 of them under a condition) · 3 never run
- Exported functions with examples
- 86%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
3 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/sebastien-le/entrainer on 2026-10-11.
Dependencies
Code & Tests
Datasets
People & History
- RR 4.6.0 released · 2026-04-24
- 1.0.0Latest2026-01-17 · current release
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-01-17
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 2.0 KB / 3 files
- Download size
- 1.5 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("EnTraineR")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.