Stata style guide
Overview
Files
Use forward slash in path names
Write out file extensions
Put file paths in quotes
Use relative path whenever possible
Naming
Do not abbreviate commands
Do not abbreviate variable names
Use verbose names to the extent possible
Separate name components with underscore
Do not put units and time in the variable name
It is ok to use short macro names in short code
It is ok to use obvious abbreviation in variable names
White space
Include a space around all binary operators
Include a space after commas in function calls
Indent code that belongs together
Each .do file should be shorter than 120 lines
Last updated