Using Stata help effectively | Johan Osterberg - Product Engineer

Using Stata help effectively

June 01, 2019

In this post we'll look at some tips to get the most out of the Stata help. In order to use Stata effectively it's crucial to get a good handle of the documentation, as it is quite comprehensive.

  • Like most software documenation Stata's help follows a structured layout. As soon as you familiarize yourself with this layout, you can get whatever information you need faster. Normally, there's some description of the command, the syntax (including options), a more detailed description, some examples, and any related references, further reading or trivia.

  • Make a habit of using help often in order to get good at it. If you're not sure about a particular syntax or a command type help command_name in the console to display its associated documentation. Ie:

help regress
  • If you have a more broader topic or concept in mind rather than a command specify search terms to enhance the possibilities of finding a relevant result. For instance, use help regress postestimation rather than just help regress. If help can't find a direct result it automatically performs a search on your behalf.

  • If you already know you wont get a direct hit using the help command you can use The search command. This command searches all help files, FAQs, manuals, and other documents:

search logit
  • There are useful examples associated with each help file. This is really helpful as you can quickly get a practical understanding of how a command works.

  • In order to view the source code of a command, there is the viewsource command. Running this will show you the underlying ado-file of the command. For example:

viewsource ml.ado

We'll look more at the viewsource command in another post.

  • The help files will also contain details about the procedures, any mathematical details, and how to interpret the output of the command.

Personally i really like the accessibility of the Stata help, to be able to get to it directly from the console is a great advantage in my opinion.


Profile picture

Written by Johan Osterberg who lives and works in Gothenburg, Sweden as a developer specialized in e-commerce. Connect with me on Linkedin

2024 © Johan Osterberg