Beta 6 months of Pro free for the first 500. Join the waitlist

Guide

Running statistical analysis with a local LLM

A language model can help plan and explain an analysis without your data leaving your machine. Here's what you need, and the one rule that keeps the results trustworthy.

Why run the model locally

Research data is often covered by consent forms, ethics approvals, data-sharing agreements or patient-privacy rules that don't allow it to be sent to an outside service. A model that runs on your own computer, or on a server inside your organisation, keeps every prompt and answer on infrastructure you control. It also keeps working offline, and costs nothing per request.

What you need

  • A runtime that loads and serves the model. Ollama and LM Studio are desktop apps that make this a few clicks; llama.cpp is the engine underneath many tools; vLLM serves models to many users from a GPU server. Most offer an OpenAI-compatible API, so other software can talk to them.
  • A model sized for your hardware. Quantized models in the 7–8 billion parameter range run on a laptop with 16 GB of memory. Smaller models of 1–4 billion parameters run on less, and are still useful for explanations and checklists. Larger models need a GPU server.
  • Software that knows statistics. A chat window alone will happily invent numbers. The model needs to work alongside a statistics engine that does the calculations.

The rule: the model writes words, the engine computes numbers

Language models predict text; they don't calculate. Asked for a p value or a mean, they can produce a plausible number that is simply wrong. Use the model to choose an analysis, explain assumptions and draft text, and let a validated statistics engine compute every value. Then check every number in the model's text against the engine's output before you rely on it.

Limit what the model sees

Even a local model doesn't need your raw data to be helpful. Variable names, labels, measurement levels and output tables are usually enough to plan an analysis and explain the results. Share individual rows only when a task needs them, and keep a record of what was shared.

How OrcStat does it

OrcStat's orchestrator works with a built-in local model, Ollama, LM Studio, or any vLLM, llama.cpp or OpenAI-compatible server on your network, and it rates each model on statistics tasks. Local Only mode is on by default, exposure levels decide what the model may see, every request is logged, and every number the AI writes is checked against the engine's output. See private, local AI in OrcStat.