Programming in STATA

Why STATA?

  • Comprehensive Statistical Tools: Offers a wide range of statistical and econometric techniques, including regression analysis, instrumental variables, panel data, and time series modeling.
  • User-Friendly Syntax: Intuitive and consistent syntax makes it accessible for researchers of different skill levels.
  • Efficient for Large Datasets: Designed to handle substantial datasets commonly used in economic research with speed and reliability.
  • Advanced Econometric Capabilities: Includes specialized tools for policy analysis, causal inference, and treatment effect estimation.
  • Customizability with Packages: Supports user-written extensions, enabling researchers to tailor Stata to their specific needs.

Important STATA Packages

A STATA package is a user-written extension that enhances Stata's built-in capabilities by adding specialized tools, commands, or functions tailored to specific research needs. These packages, developed by the Stata community, allow researchers to perform advanced analyses, streamline workflows, or address niche tasks not covered by default commands. They are easy to install directly within Stata and integrate seamlessly into the software’s environment. Below are a few relevant STATA packages commonly used in economic research.

  • outreg2 - A slideshow displaying the use of outreg by a Princeton professor can be found here. (This slideshow will be difficult to understand for beginners).
    • Creates custom tables for descriptive statistics, hypothesis testing, and grouped data.
    • Exports regression tables and summary statistics to Word, Excel, or LaTeX.
    • Offers customization options for labels, titles, formatting, and additional text to enhance output clarity.
  • esttab/estout: Create and format tables of regression results, summary statistics, and more for export.
  • Coefplot: Allows visualization of regression coefficients in customizable, publication-ready plots.
  • Psmatch2: Performs propensity score matching for estimating treatment effects in observational studies.

Introductory STATA Courses at Duke

  • ECON 204: Econometrics and Data Science
    • Develops critical-thinking skills for analyzing and interpreting real-world data using modern data science and econometric methods.
    • Provides an introduction to Stata for data analysis and econometric modeling.
    • Covers theoretical foundations and practical challenges in empirical methods, focusing on evaluating evidence and causal inference.

STATA Resources

Download STATA Tutorials (docx - 15.4 KB)