NEW FEATURES StataNow™ – May 2024


  • (StataNow™) ROBUST SES FOR VAR MODELS
    • The var command for fitting vector autoregressive (VAR) models now allows the vce(robust) option to estimate robust standard errors.
  • (StataNow™) DO-FILE EDITOR ENHANCEMENTS

    The Do-file Editor has the following new features:

    • Code folding enhancements. Code folding allows you to selectively hide parts of a document so that you can focus on sections of interest. Stata’s Do-file Editor allows you to selectively fold blocks of code in a do-file such as programs, Mata code, Python code, functions, and if statements by collapsing them to a single line. You can now quickly fold all foldable blocks of code in your do-file by using the Fold all menu item. You can then selectively unfold your code one fold point at a time to show the more important parts of your do-file, or you can use the Do-file Editor’s Unfold all menu item to unfold every fold point. You can also select lines of code and transform them into a foldable block of code by using the Fold selection menu item. This can tidy up your code and increase the code’s readability. And finally, there is a new setting for the Do-file Editor that will automatically fold every foldable block of code of a do-file when it is opened.

 

 

© Copyright 1996–2026 StataCorp LLC. All rights reserved.

    • Autocomplete variable names. Stata’s Do-file Editor now includes the ability to autocomplete variable names from data in memory. If you pause briefly as you type, the Do-file Editor will suggest a list of commands, variable names of data in memory, and words that are already in the do-file. Once the suggestions appear, more typing will narrow down the possibilities. You can navigate the suggestions by using the up- and down-arrow keys or keep typing to narrow them to a single word. Once you have the word you like, you can press Return to place the word in your do-file.
  • (StataNow™) COLORS BY VARIABLE FOR MORE GRAPHS
    • The colorvar() option is now available with additional two-way plots: lineconnectedtslinerlinerconnected, and tsrline. This means you can vary color lines, markers, and more in these plots based on the values of a specified variable.
  • (StataNow) PYSTATA ENHANCEMENTS

    The PyStata features for integrating Python into Stata and integrating Stata into Python have the following improvements:

    • When running Stata code within an IPython kernel-based environment, such as Jupyter Notebook and console as well as Jupyter Lab and console, and within other environments that support the IPython kernel, such as Spyder IDE and PyCharm IDE, Stata’s variable names in the current working dataset, macro names, and results r()e(), and s() can now be autocompleted as you type by pressing the Tab key.
    • A new %help line magic is now available; it allows you to view the help information of the specified Stata command or topic in the web browser.
    • You can now control whether to echo the Stata commands along with their output when executing them in the Python environment; and you can control whether to display Stata’s output simultaneously when the execution begins or to display the output after Stata finishes execution.
    • In the sfi module, new class BreakError is available; it allows for interrupting Python execution by using the Break key in Stata.