stata

Run Stata do files in batch mode and capture log output.

203|27|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/franklee16/academic-research-skills --skill stata-franklee16
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stata
Source: https://github.com/franklee16/academic-research-skills/tree/main/data-analysis/stata-skill-main
Command: npx skills add https://github.com/franklee16/academic-research-skills --skill stata-franklee16

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you write, run, and troubleshoot Stata workflows without getting stuck on environment setup, command syntax, or batch execution details.

Core Features & Use Cases

  • Run Stata interactively and in batch: Supports REPL-style usage and non-interactive execution of .do files, including log output.
  • Dataset loading and common analysis scaffolding: Includes a practical quick path to load built-in Stata datasets (via sysuse) and run typical analysis commands like regressions.
  • Support for Stata ecosystem development: Covers writing and working with do files, ado files, packages, and Mata programs, including guidance for package distribution structure.

Quick Start

Ask the skill to guide you through running a Stata do file in batch mode and saving the results to a log for a specified .do script.

Frequently Asked Questions about stata

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a Stata do file in batch mode and save the output to a log?

To run a Stata do file in batch mode, use the bundled stata-mp executable to execute the script non-interactively and generate a log output file containing all results and command histories.

Can I write and debug Mata programs and ado files within Stata?

Yes, you can write, run, and debug Mata programs and ado files within Stata, including guidance for package distribution structure and typical analysis commands like regressions.

What is the quickest way to load a built-in Stata dataset for regression analysis?

The quickest way to load a built-in Stata dataset for regression analysis is using the sysuse command, which provides a practical scaffolding path to load data and execute statistical commands.

Does this Stata environment support interactive REPL-style execution alongside batch processing?

Yes, the configured StataNow environment supports both interactive REPL-style usage for exploratory analysis and non-interactive batch execution of .do files for automated workflows.

Why does my Stata workflow fail when trying to execute commands without proper path conventions?

Stata workflows require practical command and path conventions for documentation lookup and common tasks; failing to use the bundled stata-mp executable or correct paths causes execution failures.

What Stata version is required to run do files and debug statistical code reliably?

Writing, running, and debugging Stata code reliably requires using the bundled Stata executable, specifically stata-mp 19.5 MP, which supports batch execution options for .do files and Mata programs.