Autor: López Federico Ariel*, Sosa Raúl*, Galiani Sebastian**


Institución: (*)UdeSA, (**)Tulane University


Año: 2026


JEL: C87, C18


Resumen:

We study how large language models write code for econometric analysis. We compare three dimensions of AI-assisted coding: statistical software (Stata, R, or Python), prompting (zero-shot versus few-shot), and the degree of agency, from a chatbot that writes a single script to an agent that executes and revises its own code. On a benchmark of applied econometric and statistical tasks, moving from the chatbot to the constrained agent raises task success from 82 to 97 percent, at about eight additional cents per run. For Claude Sonnet 4.6 through Claude Code and GPT-5.4 through Codex, few-shot prompting improves the chatbot far more than the constrained agent. For these models, differences across statistical software are sizeable under the chatbot but largely disappear under the constrained agent.