Archive

Archive for October 2025

Stata commands to run ChatGPT, Claude, Gemini, and Grok

I wrote a blog post in 2023 titled A Stata command to run ChatGPT, and it remains popular. Unfortunately, OpenAI has changed the API code, and the chatgpt command in that post no longer runs. In this post, I will show you how to update the API code and how to write similar Stata commands that use Claude, Gemini, and Grok like this: Read more…