Stata 18 Jun 2026
Stata 18 introduced 29 major new features across a wide range of analytical areas. Below is a comprehensive breakdown organized by category.
For programmers working with multiple languages, the Do-file Editor now includes syntax highlighting support for Python, Markdown, Java, and XML files. This integration recognizes that modern statistical programming often spans multiple languages, and provides a consistent editing experience regardless of the language you’re using.
Improved auto-completion, bracket matching, and integrated navigation bars for complex scripts.
The pystata Python package, shipped with Stata 18, defines functions and magic commands that allow you to interact with Stata from within Python. To use this functionality, you need Stata 17 or later and Python 2.7 or 3.4 or later. For full functionality, NumPy 1.9 or later and pandas 0.15 or later are recommended. The package is located in the pystata subdirectory of Stata’s utilities folder, and you must configure it so that Python can locate it. Stata 18
Performance is a silent but vital part of any software update. Stata 18 includes several "under the hood" improvements:
Stata 18 includes official support for DID models where treatment effects vary over time and across groups, a standard requirement in modern econometrics.
The editor now supports column-mode selection and editing, making it easier to manipulate structured text. An indentation guide displays vertical lines at every tab stop to aid in writing visually clean code. You can choose to display whitespace characters as dots for spaces and arrows for tabs, making the structure of your code more apparent. Stata 18 introduced 29 major new features across
Stata 18 sets a high standard for statistical software, offering powerful new tools for high-dimensional data, causal inference, and dynamic modeling, while strengthening the user's ability to produce high-quality, reproducible work. Whether you are a student, an academic, or a professional data scientist, Stata 18 provides the necessary tools for complex analysis in the modern research landscape.
The software’s continued commitment to reproducibility—through integrated version control, backward compatibility, and dynamic reporting—ensures that analyses conducted in Stata 18 will remain valid and reproducible for years to come. At the same time, the evolution toward continuous releases with StataNow signals that StataCorp is adapting to modern expectations of software delivery.
frame create quarterly frame quarterly: use quarterly_financials frame change master frlink m:1 firm_id quarter, frame(quarterly) frget profit, from(quarterly) To use this functionality, you need Stata 17
One of the most significant statistical additions in Stata 18 is Bayesian model averaging, implemented through the bmaregress command. Traditional model selection approaches force you to choose a single “best” model from among many candidates, ignoring model uncertainty in subsequent inference. Bayesian model averaging takes a different approach: rather than selecting a single model, BMA averages predictions across many models, weighting each by its posterior probability. The result is more reliable inference and better predictions that properly account for model uncertainty. You can explore influential models and predictors, obtain better predictions, and gain deeper insights into which variables truly matter.
The ability to pull data via JDBC/ODBC, process it in Python, and model it in Stata within a single script makes it a highly versatile pipeline tool.
For example, you can estimate county-level poverty rates from a state-level survey by borrowing strength from covariates like tax returns and demographic data. implements both direct and model-based estimators (Fay-Herriot, unit-level).