Stata
Templates¶
**# Setup
version 19
frame reset
local output_path "../output"
local temp_path "../temp"
* ============================================================================ *
**#
* ============================================================================ *
Snippets¶
Heading
* ============================================================================ *
**#
* ============================================================================ *
* ============================================================================ *
**##
* ============================================================================ *
* ---------------------------------------------------------------------------- *
**##
* ---------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------- *
**###
* ---------------------------------------------------------------------------- *
Copied code
* ---------------------------------------------------------------------------- *
* Start of copied code.
* ---------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------- *
* End of copied code.
* ---------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------- *
* Start of copied code.
* ---------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------- *
* End of copied code.
* ---------------------------------------------------------------------------- *
Introduction¶
Do files¶
Style guide¶
Resources¶
Syntax¶
Control flow structures¶
Delimiter¶
-
When a do-file begins, the delimiter is a carriage return. The command
#delimit ;changes the delimiter to a semicolon. To restore the carriage return delimiter inside a file, use#delimit cr.
Programs¶
Data types¶
Data manipulation¶
Data import¶
Labels¶
Data frames¶
frlink 1:1 <varlist1>, frame(<frame_name> [<varlist2>])
fralias add <varlist>, from(<link_name>)
frget <varlist>, from(<link_name>)