MétaCan
Menu
← Back to cohort
Record W7116753467 · doi:10.5281/zenodo.18010065

AurelienNicosiaULaval/contextual-statistics-with-llm: First release of the contextR package

2025· other· W7116753467 on OpenAlexaffabout
Aurélien Nicosia

Bibliographic record

VenueZenodo (CERN European Organization for Nuclear Research) · 2025
Typeother
Language
Field
Topic
Canadian institutionsUniversité Laval
Fundersnot available
KeywordsR packageStatistical analysisStatistical modelLinear regressionInterpretation (philosophy)ImplementationRegression analysisWork (physics)

Abstract

fetched live from OpenAlex

Release: contextR v0.1.0 🧠📊 We are excited to announce the first release of contextR, an R package that bridges the gap between statistical analysis and Large Language Models (LLMs). What is contextR? contextR extends standard R statistical functions (lm, t.test, aov, etc.) to provide context-aware interpretations of your results. By leveraging local LLMs via Ollama (or OpenAI), it automatically generates plain-language explanations, making statistical insights more accessible. Key Features 🤖 AI-Powered Interpretation: Get immediate, contextual explanations for your statistical tests. 📈 Smart Visualizations: Plots come with auto-generated, meaningful titles and subtitles that describe the findings. 🔒 Privacy-First: Designed to work with local LLMs (Mistral, Llama 3, Gemma) via Ollama—your data stays on your machine. 🛠️ Drop-in Replacements: Functions like lm_context() and t_test_context() work just like their base R counterparts but return richer objects. 📦 Comprehensive Support: Linear Regression (lm) T-tests (t.test) ANOVA (aov) & Tukey HSD PCA (prcomp) Chi-squared & Proportion tests Time Series (arima) KNN Classification Correlation Matrices Installation You can install contextR directly from GitHub: # install.packages("devtools") devtools::install_github("AurelienNicosiaULaval/contextual-statistics-with-llm/contextR") Quick Start Install Ollama from ollama.com and pull a model: ollama pull mistral Run an analysis: library(contextR) # Contextual Linear Regression fit <- lm_context(mpg ~ wt + hp, data = mtcars) # Print results with AI interpretation print(fit) # Plot with AI-generated titles plot(fit) Acknowledgments This package was developed by consolidating the best implementations from student team projects at Université Laval. It represents a collaborative effort to modernize statistical reporting in R.

Fetched live from OpenAlex and de-inverted. Abstracts are not stored in this database: the inverted indexes are 8.6 GB of the frame’s 9.3 GB of text, and the host has 13 GB free.

How this classification was reachedexpand

Full frame machine prediction

Teacher imitation

Not calibrated prevalence, not ground truth. Human validation pending. The Gemma side is a direct model label for every work in the frame, read from the title-only record. The Codex side is a classifier learned from the 10,348 direct Codex labels and calibrated to design-weighted sample rates; fields without enough sample support carry no Codex call. Candidate is the union of the two sides; consensus is their intersection. These outputs are machine_predicted_unvalidated and are not human labels.

metaresearch head score (Codex)0.004
metaresearch head score (Gemma)0.020
Version: metacan-v3-hybrid-931329e0061cValidation status: machine_predicted_unvalidated
Candidate categoriesInsufficient payload (model declined to judge)
Consensus categoriesnone
DomainCandidate signal: none · Consensus signal: none
Study designCandidate signal: Not applicable · Consensus signal: Not applicable
GenreCandidate signal: Software · Consensus signal: Software
Teacher disagreement score0.312
Threshold uncertainty score0.982

Distilled classifier scores by category (both heads)

CategoryCodexGemma
Metaresearch0.0040.020
Meta-epidemiology (narrow)0.0040.003
Meta-epidemiology (broad)0.0020.003
Bibliometrics0.0020.001
Science and technology studies0.0010.001
Scholarly communication0.0040.004
Open science0.0030.004
Research integrity0.0020.004
Insufficient payload (model declined to judge)0.3120.313

Machine scores (provisional)

The two teacher heads of the student model, read on this work. A score orders the frame for review; it never asserts a category, and the validation status ships verbatim with every row.

Baseline scores from an immature model (maturity gate not passed, 7 training rounds). Scores rank; they never assert a category.

Opus teacher head0.020
GPT teacher head0.233
Teacher spread0.213 · how far apart the two teachers sit on this one work
Validation statusscore_only:v0-immature-baseline · verbatim from the scoring run: score_only means the number may rank works, and no category label ships from it

Classification

machine, unvalidated

Machine predicted; a candidate call from one source (direct Gemma or distilled Codex), not a consensus.

Study designNot applicable
Domainnot available
GenreSoftware

How this classification was reached, model by model and score by score, is at the end of the page under "How this classification was reached".

Quick stats

Citations1
Published2025
Admission routes2
Has abstractyes

Explore more

Same venueZenodo (CERN European Organization for Nuclear Research)→French-language works237,207→