By Sumedha Gupta and Coady Wing
Health economists are used to treating software as an important tool for their work. It’s not that statistical packages are perfect works of art, of course. Nearly everyone has complaints about strange features of R or Stata. And we all have stories about coding errors that seemed impossible to decipher until someone pointed out a missing comma or a misplaced backtick. Still, there is little doubt that packages like SAS, Stata, and R are central to the working lives of health economists. How else are you going to estimate the effects of coinsurance changes on health care utilization using a huge data set of insurance claims data? And you won’t be able to learn much from the BRFSS data if you only have excel on your computer.
But even though statistical software is an important part of empirical health economics, most of us don’t worry that the software might be coming for our jobs. However powerful statistical packages have become over the years, they still don’t frame up interesting questions, come up with clever research designs to solve identification problems, interpret the results of the analysis, or respond to criticism raised by reviewers. A good statistical packages is in important input into health economics research. But it isn’t really a substitute for a health economist or a team of health economists.
Things might be changing. Over the last year, many of us have encountered agentic AI tools like Claude Code and Codex, which connect large language models with the context and resources of your local computer or server. Many more are working in much the same spirit without ever connecting their machines: uploading their documents, data extracts, and code into a chat window and iterating with the model in ways that are agentic in everything but name. That distinction is likely to keep narrowing. As platforms make it easier to bring all the relevant context into a session, the line between the chat window and the connected agent will matter less, and most of what follows applies to both.
In a host of ways, working with Claude Code really does feel like working with a colleague or research assistant. You can ask it to write code that will clean data, fit regression models, create figures, and write up text explaining the methods and results. Often It does a good job on the first try. And you and Claude can iterate much more quickly than most Professor-RA pairs. If you ask Claude questions about the meaning of the results or the credibility of key assumptions, he will offer answers that often are impressive. Suddenly, it seems that you can learn a lot by collaborating with an AI tool.
There are some wrinkles to consider. In health economics research, data use agreements (DUAs) and protected health information (PHI) often impose binding constraints on where the data is stored and how it can be analyzed. In many cases, allowing some or all of your data to be transferred between your local secure server and the servers that run Claude or ChatGPT would violate the DUA. To get a practical sense of how researchers are navigating these constraints, we spoke with Jason Fletcher (Vilas Distinguished Achievement Professor, La Follette School of Public Affairs, University of Wisconsin–Madison) [JF], Scott Cunningham (Ben H. Williams Professor of Economics, Baylor University, currently visiting Harvard) [SC], and Kosali Simon (Distinguished Professor, Herman B Wells Endowed Professor, Indiana University) [KS].
Getting Started
If you haven’t been working with Claude Code or Codex, you should give it a try. These tools are a whole different experience from using the chatbot version of Claude and Chat GPT. Using them gives you a much more vivid understanding of why people in the AI industry are so convinced that they are working with a transformative technology.
One way to get started is to install the claude code app on your local computer and make an appropriate account with Anthropic — there aren’t any free versions of Claude Code. New users should also be cautious about how they install these tools. Interviewees noted that phishing attempts and fake AI-installation websites have become increasingly sophisticated, particularly around command-line tools. A practical rule is to install software directly from the official vendor website and avoid copying terminal commands from unverified sources. Anthropic’s Claude Code quickstart guide will have you moving along in short order. The original Claude Code is a command line interface (CLI) that you use inside a terminal window. If the words ‘terminal’ and ‘command line’ may sound a bit intimidating, remind yourself that you operate in a command line style environment every time you use Stata or R interactively. (But also note that there are also Claude Code and Codex desktop apps that have a graphical user interface.) Once you have the app installed, create a new directory the way you might for any other project: include folders for data, code, manuscript, slides, etc. Now open the terminal, change directory to the project directory, and launch the app by tying “claude” at the commend prompt. It’s good to start off the project by telling Claude what the project is about and ask it to create a claude.md file that will explain things it to future instances of Claude. Just type this kind of thing in plain text. Once the project set up is out of the way, you and Claude can get to work. Try asking Claude to do the same kinds of tasks you would normally either do yourself or perhaps assign to an RA. For example, you might ask it to write a sequence of R scripts that will read in 10 years of repeated cross-sectional survey data from the data folder, clean and harmonize a list of 10 variables, vertically concatenate them into a single long form data set, estimate a collection of twoway fixed effects regressions, and output the results tables formatted for latex. Claude will get to work, often asking you permission to use your computer in certain ways. It may want to have a peek at the data in one of the files. At some point, it may ask to use R to run a script it has written to see if it works as planned or has any bugs. Sometimes, it may want access the internet to search for information. Give or deny permission as you see fit: this is one way to build your intuition for how it works and perhaps you will discover what you are and are not comfortable with.
You will be surprised how well all of this works, even on the first try. It is a lot like working with a human research assistant — except speed of iteration is much faster. Like a human research assistant, Claude does a lot better when you give clear instructions and when it understands the context of your request. As you gain experience, you will learn strategies for creating skills and rules that clarify your preferences in ways that help Claude do things the way you prefer.
Even if you do not go in for so-called “one-shot” research papers, it seems hard to imagine that agentic coding tools won’t increase the productivity of health economists. It lowers the cost of research in ways that may increase both the quantity and the quality of the work we do. Small and large empirical exercises, historical digitization projects, or tedious data-cleaning tasks that once felt difficult to justify can now become feasible short order.
The gains are not confined to data work. Scott Cunningham told us that “making a great deck of slides is the key use case for many faculty. It is hard to make perfect slides in Beamer, but very fast and high quality to do it with Claude”. The same logic applies to teaching preparation and the IRB protocols that consume so much faculty time. Individually, these are small efficiencies; collectively, they can reshape the work week.
Constraints on AI Use
The value of AI tools may affect decisions about what kind of projects to pursue and what data sets and other resources to use. Someone working with IPUMS or BRFSS can experiment relatively freely with agentic workflows. In contrast, people working with MarketScan, Medicare claims, or FSRDC projects may not even be permitted to install these tools on secure servers.
Jason Fletcher pointed out that some universities do not allow Claude Code on their computing systems, which may push researchers towards personal computers that face fewer restrictions – the mac mini is a popular choice. Likewise, he speculated that researchers might discover new value from historical and public use datasets where AI tools are easy to use: “I think we’re about to see papers using public-use survey datasets that have been on the downswing for a while … the cost of cleaning messy data has fallen significantly. We may see a temporary boom until these datasets are mined out”. For early-career scholars without easy access to expensive restricted-use data, this may represent a rare leveling of the playing field. In the longer term, it seems likely that both computing environments and data use agreements will be adapted in ways that permit AI use in some form or another. But it is not yet clear how these problems will be resolved.
A related concern is whether agentic AI tools create broader cybersecurity or privacy risks beyond formal DUA compliance. Researchers may reasonably worry whether these systems could expose sensitive files, access personal information, or create vulnerabilities on local machines. At present, most mainstream AI coding agents operate only within the permissions and directories explicitly granted by the user, much like any other software tool. But the practical lesson is the same as with any cloud-connected technology: researchers should understand what permissions they are granting, avoid unnecessary access to sensitive systems, and follow institutional security guidance carefully. Simon, who has worked on exactly these governance questions at her own institution, argues the blanket framing misses a crucial distinction. “The DUA question and the code-generation question are not the same question. Sending de-identified text to a model for classification is a different governance decision than using a model to write code that never sees the data. Institutions that collapse the two into one blanket ‘no AI’ policy end up either over-restricting safe uses or under-scrutinizing risky ones” [KS].
Tips for Success
Read the code it wrote. This obvious, but it was the most consistent piece of advice we heard from the economists we spoke with. AI assistants can write a lot of code very quickly — code that may contain choices and judgement calls you wouldn’t agree with or that changes the nature of the sample or the results. In our experiences, agentic coding tools often write code that does not fail or crash. This sounds desirable but it can be surprising. For example, Jason Fletcher pointed out that he had an experience where Claude’s script cautiously decided to “check whether the data file existed before trying to open the file. Basically, ‘if the filename doesn’t exist, skip this line of code and keep going’. At the end, I realized it had dropped five years of data because a filename was misspelled up front or something”. Stata users raised on the force command will recognize this kind of thing. An agent that defaults to forcing code through errors can quietly bypass the very inconsistencies the researcher needed to detect. The code seems to run perfectly — but the data set is not what you think it is.
Test Driven Development. Most economists were trained to write Stata do-files as long, mostly linear workflows. In the AI era, we need to become better at testing and verifying that the code does what we want. Jason gave an intuitive example: “For merges … you need to make some tests in advance, just like you teach a student. Before you do this merge, how many rows are there going to be when you’re done? You should know the answer before you do anything” [JF]. Asking the agent to state expected row counts up front and then test that the end product meets expectations is an easy example of test oriented coding. Applying this style of thinking to other parts of your work will take some creativity and practice. Verification is one area where AI errors diverge sharply from human ones. Scott Cunningham observed that “Human mistakes we understand. We have good intuition for how they come about. AI mistakes are weird to us: they are hard to predict and understand”. One pragmatic response is to use a second, independently trained model to check the output produced by the first. To put the practice plainly: “I deliberately split the work across tools and then run each task across the other tools for added verification. I treat agreement between them as weak evidence rather than proof. When they disagree, I know there is extra reason to investigate that part more.” [KS].
Treat reproducibility as an output, not an afterthought. “The repository, the codebook, the decision log, these are deliverables in their own right, not housekeeping. An AI-assisted workflow that you cannot hand to someone else and have them rerun is not faster research, it is just faster output. The reproducibility artifact is what converts speed into something a referee, or your future self, can trust. This is probably good practice in the face of unknown future expectations on documentation of how AI was used, if we are to learn from that as well as from the research itself” [KS].
Research Teams and Pipelines. All three economists we spoke with described shrinking, rather than expanding, their research groups. Jason Fletcher explained that the number of students and postdocs in his lab had shrunk after some time working in administration. “It just so happens that I had over time gotten a smaller and smaller research group … I was at this stage of, do I want to build back up to ten students? And it’s happened at the same time as all these AI opportunities. It’s made it even clearer that building back up a lab is hard for me to justify” [JF]. Scott Cunningham, who noted that he has “never been a major user of RAs” and generally finds the process of working with an RA to be “slow and unpredictable,” may have arrived early at something resembling the post-AI equilibrium of “just do it myself” [SC]. The implication is not that students are obsolete. But AI may alter the scale and organization of research teams, particularly in empirical fields where large RA infrastructures evolved partly to manage coding, cleaning, and replication workflows. The traditional medical-school-style lab model, in which a single PI supports large numbers of trainees through fragmented grant funding, may become less dominant. More centralized training structures, where students rotate across faculty and shared research infrastructure, may prove more resilient.
One of the most consequential disagreements among the economists we spoke with concerns the implications for junior scholars. “We should expect a divide between tenured and non-tenured people because of skill depreciation … tenure protects against some of that. If I were someone who didn’t want to use these tools, I might think: other people can do it, but it’s not really going to affect me. But someone starting a faculty job this year may feel very differently about where they will stand in four years”, said Jason Fletcher. “An established researcher’s voice is already known, so AI-assisted or not, the work reads as theirs. Junior scholars do not have that yet, which is exactly why presenting in person and building a recognizable voice matters more now, not less. You want no reader of your work wondering whether the ideas and solutions are really driven by you” [KS]. In the other direction, it is possible that dissertations built entirely in RDC or PHI environments, where third-party data providers effectively enforce AI-free workflows, may soon function either as powerful signals of authenticity? Or will people working this way simply produce less research at a slower pace and a lower level of quality? Economics has long treated the polished job-market paper as a signal of capability. Whether that signal survives unchanged in a world where well-prompted candidates can produce substantially more output may become one of the field’s more interesting natural experiments.
Teaching. The classroom is where the adjustment may be least subtle. “At the conclusion I said, okay, this is the end of the final paper in my undergraduate class. So now I’m moving to in-class midterms this fall” [JF]. The traditional take-home empirical assignment may not survive the AI era in its current form. In-person assessment, oral explanation, and AI-assisted tutoring are likely to become increasingly complementary. Health economics faculty teaching in MPH, MD, and policy programs, where students arrive with highly heterogeneous prior exposure to coding, may find this transition particularly disruptive.
Taste and Repugnance
It is fashionable to argue that the economist’s comparative advantage in the AI era is “taste”: knowing which question is worth asking, which identification strategy will survive referee scrutiny, and which graph belongs in the main manuscript rather than the appendix. The point is probably right in some sense. But it is hard to decide how much of the research skill is really embedded in this kind of tacit knowledge. “It pokes around the question of whether AIs are ever really going to develop whatever it is we mean by this ‘taste’ measure. I’m not sold” [JF].
Some colleagues will simply not use these tools, and that reaction deserves more curiosity than it has received. “Some people have a visceral negative reaction to AI. What explains this? Al Roth-style repugnance?” [SC]. The literature on repugnant markets offers a useful framework here: positions held strongly today on grounds of dignity, authorship, or authenticity are not always preserved once a technology becomes mundane. They are also not always wrong.
We thank Scott Cunningham, Jason Fletcher, and Kosali Simon for generously sharing their time and candid perspectives. Errors and editorial liberties are ours alone, a caveat that, we note, no current AI model is yet willing to write about itself. Readers interested in the editorial and journal-coordination perspective on AI-assisted submissions may consult the recent summary of the May 8, 2026 NBER panel posted on Coady Wing | Substack. Jason Fletcher’s substack covering related and other topics can be accessed at https://jasonmfletcher.substack.com/. Scott Cunningham’s substack is available at: https://causalinf.substack.com/.