Topic summary
Introduction
In this topic, you have learnt the following:
- STATA has a unique interface that includes various panels like Variables (for listing the variables in the dataset), Properties (for showing properties of the opened dataset and the selected variable), Command (for issuing commands), Results (for displaying textual and tabular output), and Review (for listing commands that have been run in the session).
- In the course, we will focus on using commands for data analysis, which offers greater control and efficiency compared to the graphical user interface.
- Commands in STATA are issued by typing them into the command panel, along with mandatory and optional parameters.
- The help documentation in STATA is a valuable resource for learning commands, understanding their functions, and accessing examples. Type
help
, followed by the command you need help for to go to the command documentation, e.g.help summarize
- Do-files in STATA help keep commands organized, reproducible, and trackable, while also allowing for easy execution and modification.
- Comments should be added to do-files to improve clarity and organization, using two forward slashes (//) before the comment text.
- Logging is essential for preserving the output of the analysis, as the do-file only saves the commands. Log files can be accessed later for reference.
- STATA offers shorthand versions of commands for convenience (e.g.,
ta
fortabulate
). - Always use variable names, not variable labels, when specifying variables in commands.
- Variable names can also be shortened, e.g. monthly for monthlyhouseholdincome, as long as there is no other variable that starts with the shortened name
- Familiarize yourself with the toolbar shortcuts for common tasks like opening and saving datasets, and printing results.