Read and Explore Data
|
Always write out filename extensions to avoid confusion.
Always use forward slash / in path names.
Use short and descriptive variable names.
Label your variables.
|
Data Formats and Data Quality
|
Use the missing value feature of Stata, not a numerical code.
Test for missing values with the missing function.
In Stata expressions, missing values are greater than any number. Functions of missing values are missing value.
Check CSV files for separator, variable names, and character encoding.
|
Transform Data
|
Drop unnessecary variables freely.
Reshape your dataset to create tidy data.
Use egen to save statistics to new columns, collapse to aggregate the entire dataset.
|
Combine Data
|
|
Save and Reuse your Work in .do Files
|
Add commands to a .do file.
Run .do files en bloc, not by parts.
Check what directory you are running .do files from.
|
Repeat Tasks with Loops
|
|
Advanced Programming Topics
|
|