Getting Started with Stata
What is Stata?
If you want to work in econometrics, chances are you’ll need to learn to use a statistical analysis package like Stata. Stata is one of the most widely used software packages to help students and researchers explore, summarise and analyse complicated datasets. The software is available in several different versions which differ mainly in the number of variables allowed in memory.
One of the major advantages of Stata is that it is eminently portable. Its developers are committed to cross-platform compatibility and so Stata runs the same way on Windows, macOS, Unix, and Linux systems. All versions of Stata provide the full set of features and commands: there are no special add-ons or toolboxes.
Five important features for getting started with Stata
1. The toolbar
The Toolbar contains icons that allow you to open and save files, print results, control Logs, and manipulate windows. Some very important tools allow you to open the Do-File Editor, the Data Editor and the Data Browser.
2. Current working directory
The cwd is the directory to which any files created in your Stata session will be saved. Likewise, if you try to open a file and give its name alone, it is assumed to reside in the cwd. If it is in another location, you must change the cwd [File >Change Working Directory] or qualify its name with the directory in which it resides. You generally will not want to locate or save files in the default cwd. A common strategy is to set up a directory for each project or task in a convenient location in the filesystem and change the cwd to that directory when working on that task. This can be automated in a do-file with the cd command.
3. Command panel
As you’d expect, to execute a command in Stata, you type it into the Command Panel. Although traditionally a command-line driven package, recent versions of Stata contain a user-friendly graphical user interface (GUI). A major advantage of the GUI is that when you are using a new command, you can easily find out the correct syntax to use by viewing it in the command panel.
4. Do file
The Do-File editor allows you to construct a file of Stata commands, or “do-file”, and execute it in whole or in part from the editor. A major advantage of a do file is that ability to quickly and effortlessly reproduce your analysis and results.
5. Adopath commands
Another advantage of Stata’s command-line driven environment involves extensibility: the continual expansion of Stata’s capabilities. Only a small fraction of the commands you can use in Stata are built in. If a command is not built into the Stata kernel, Stata searches for it, meaning you can acquire additional user contributed Stata commands from a number of online sources. Stata’s capabilities thus extend far beyond the official, supported features described in the Stata manual to a vast array of additional tools.
These tips are just a start, to gain a deeper understanding of the features of Stata we recommend attending an introductory course. For example, Timberlake’s Stata Fundamentals Online Course gives a complete introduction to Stata and is ideal for new users who want to get a head start and learn how to use the software efficiently. What’s more, with an online course you can learn from the comfort of your own home. Find out more about our next online course on 18 September 2017 here.
For more advice for economists, see these articles:
- Career Advice
Jobs for Economists in the Government: The Right Career to Consider?
When discussing jobs in the government, the type of work that comes to mind is most likely influenced by your particular background. In countries in which large segments of the economy are nationalized, it’s possible to become a civil servant in nearly any field. In other places, your options might be more limited. Regardless of where you’re from, or where you’d like to work, however, every government employs economists, and it’s easy to argue that they’re needed now more than ever - though in the weird times of the pandemic, finding a government job may be more complicated.
- Career Advice
The Top Jobs in Macroeconomics and Monetary Economics
Studying macroeconomics, as many INOMICS users have done, opens doors to countless different jobs down the line.
- The Freight Shipping Industry
Who is Responsible for a Shipping Vessel? Ownership and Scrapping
The United Nations Convention on the Law of the Sea (UNCLOS) stipulates that the primary responsibility for vessels lies with the flag state of the vessel. Consequently, this means that each merchant vessel must be registered under the flag of a specific state. The flag state of the vessel is responsible for the inspection of the vessel and compliance with safety, pollution prevention, crew certification and international standards.