Piecewise execution of do-files in Stata

Do-files in Stata easily get a bit lengthy. Of course, you can try to shorten do-files and distribute code onto several do-files and have one master file that runs all of the respective sub-do-files (which are included by do dosubfile1.do). Alternatively, you can leave the do-file longish but write your code such that you only run parts of the code at once:

Continue reading “Piecewise execution of do-files in Stata”

#LaTeXtip: to reset page numbers write \setcounter{page}{0}, to increment by 2 pages write \addtocounter{page}{2}, and to change styles write \renewcommand{\thepage}{\roman{page}} and use either roman (I, II etc), alph (a, b etc), Alph (A, B etc) or arabic (1, 2 etc)

Multiple lines commands in Stata

Many Stata commands get easily quite long. Take, for example, a command to generate a figure – possibly the layout definitions are quite lengthy and difficult to read. Stretching commands over several lines makes it much easier to write and read, and less prone to errors. 

Continue reading “Multiple lines commands in Stata”