Stata is a statistical software package widely used in the Schools and Programs in Public Health in the U.S. It is popular among students and novice users because of its user-friendly menu driven interface and among faculty and researchers due to its easy to use do-files. Do files are text files that execute Stata commands through a single Stata command do instead of typing them in the command window. More about that later.
I will be using Stata version 14 to demonstrate how Stata works. Also, I will be using courier font to show Stata commands.
Throughout this presentation, I will insert screen captured images to show dialog boxes. I will demonstrate the use of both the drop-down menus (point and click) and Stata command window to perform the analysis. I will only show the use of most common Stata functions.
You will benefit the most from this tutorial if you have a Stata session open in front of you. Let’s begin.
As you open Stata, you will see Stata window split into five windows. These are Review, Results, Command, Variables, and Properties. When you import or enter data directly into Stata, all variables appear in the Variables window. The properties window show variable Properties such as its format, label, value label, etc. You enter Stata commands in the Command window. When you hit enter on your keyboard, Stata will execute the command and temporarily store it in the Review window.
If you want to reuse the command, simply click on it in the review window, and Stata will move it to the command window for you to execute it. Once the command is executed the results appear in the Results window.
Now, let’s look at the drop-down menu.
Click on each of the drop-down menus.
File: This menu among other functions allows you to open Stata datasets, import excels dataset into Stata, and create a log file.
Data: This menu includes several data management functions such as generate, recode, label, or merge two or more datasets. Variables manager dialog box can also be accessed from this menu. I find using Data menu for merging or appending datasets very useful. Using menus for other data management functions is quite tedious. Therefore, I recommend entering commands directly in the command window instead.
Graphics: Under the graphics menu you will find all the graphics command.
Statistics: You can find all statistics commands under this menu.
Just under the drop-down menu, you will see several icons.
These are from left-to-right file open, save, print, log, finding help, graph, do file, data editor, data browse, and variables manager. Take a moment to click on icons.
- Stata window is split into five windows: Review, Results, Command, Variables, and Properties.
- Drop-down menus are listed on top of the Stata window.
- The four drop-down menus most relevant for someone just starting to use Stata are File, Data, Graphics, and Statistics.