Submitted:
15 October 2026
Posted:
16 October 2026
You are already at the latest version
Abstract
Large language models (LLMs) are increasingly being used to support data analysis and have the potential to make statistical methods more accessible to clinicians and medical researchers with limited programming experience. However, the rapid development of technologies surrounding LLMs has introduced new concepts and workflows that may be unfamiliar to potential users. In particular, tool calling, sandboxing, and data science agents provide different mechanisms through which LLMs can perform statistical analyses, yet the distinctions between these approaches are often unclear. This paper introduces and compares these three developments from the perspective of statistical data analysis. Tool calling allows an LLM to access predefined statistical functions, sandboxing provides a controlled computational environment in which model-generated code can be executed, and data science agents extend these capabilities by combining reasoning, tools, memory, planning, and execution environments to pursue analytical objectives through multi-step workflows. Their application is illustrated using the R programming language together with the ellmer and securer packages. Examples demonstrate how statistical analyses can be performed using predefined functions, code execution within a sandbox, and a simple biostatistics agent. The advantages, limitations, and verification requirements of each approach are discussed, with particular emphasis on transparency, reproducibility, and human oversight. This paper aims to provide clinicians, researchers, and statisticians with an accessible introduction to these emerging technologies and their potential role in LLM-assisted data analysis.

Keywords:
large language models
; tool calling
; sandboxing
; data science agents
; biostatistics
; data analysis
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.