Using Claude Code for Data Analysis
Event box
Using Claude Code for Data Analysis In-Person
Coding agents such as Claude Code can inspect data, write and execute R code, troubleshoot errors, and produce reproducible analysis files. Recent research suggests that these systems are most reliable when the statistical task is clearly specified. They are considerably less reliable when asked to independently choose the research target, assumptions, model, or interpretation.
In this introductory, hands-on workshop, participants will learn how to direct and evaluate agent-assisted statistical analysis without surrendering statistical judgment. Using an I Do, We Do, They Do structure and real datasets, we will work through the complete analysis process: defining the research target, writing a clear analysis brief, auditing the data, approving a statistical model, inspecting generated R code, verifying the results, and determining what the evidence can support.
The goal is not to replace learning R or statistical methods. Instead, participants will develop a practical understanding of where coding agents can accelerate good analysis and where human expertise must remain in control.
Learning Objectives
By the end of the workshop, participants will be able to:
- Summarize what current research suggests coding agents do well and where substantial uncertainty remains.
- Explain how Claude Code works with project files, R scripts, tool output, context windows, and saved research artifacts.
- Write a structured analysis brief specifying the motivation, hypothesis, target quantity, data, estimator, outputs, decision rights, and stop conditions.
- Inspect generated R code to verify the model formula, analysis sample, reference categories, contrast direction, and output.
- Distinguish computational reproducibility from statistical validity and defensible interpretation.
- Identify consequential choices supplied by an agent and decide whether to proceed, revise, stop, or seek additional expertise.
- Apply a repeatable workflow for integrating coding agents into real statistical projects while maintaining human responsibility for the analysis.
Audience
Graduate students, faculty, and staff. Basic familiarity with applied statistics or R will be helpful, but prior experience with Claude Code is not required.
Workshop Preparation
Researchers should come prepared with R, Positron, and Claude Code installed on their computers. We will begin the workshop with the assumption that this software is installed and working.
For participants who do not have a Claude account, a temporary API key can be provisioned. Please contact us at statlab@yale.edu before the workshop to schedule a time to confirm that everything is working properly.
Library workshop incentive attendance: Yes/No. Any student who attends at least three library workshops this semester will be eligible to receive a FREE Yale Library tote bag. Learn more .
- Date:
- Thursday, October 15, 2026
- Time:
- 10:00am - 12:00pm
- Time Zone:
- Eastern Time - US & Canada (change)
- Location:
- RKZ Library Classroom 01
- Campus:
- Science Hill
- Audience:
- Faculty Graduate Students Postdoc Staff
- Categories:
- AI (Artificial Intelligence) Computational Methods and Data StatLab