There are two ways of running Stata with Copilot integration: context-aware and context-unaware. The main difference is that context-aware integration allows Copilot to access and understand your Stata code, data structure, and current workspace—including Stata output, variables, globals, locals, etc.—providing more relevant suggestions. Context-unaware integration treats Stata as a generic text editor without understanding the specific context of your analysis.
Currently, existing VSCode extensions for Stata permit running it in a context-unaware way. However, you can use statamcp.com - an AI agent for Stata (not explained here).
To enable AI-assisted Stata coding on your laptop, follow these steps: