#StataTip: for blockwise selection of code in #Stata|'s do-file editor, press the option key (Mac) or alt key (Windows) and mark the respective cells with your mouse/cursor.
#StataTip: use inlist(VAR,a,b,c,...,y)==1 to condition on numerical a, b, c, etc. Works also for string variables!
#StataTip: use missing(VAR)==1 to condition on variable VAR being missing
#StataTip: use missing(VAR)==1 to condition on variable VAR being missing
#Statatip: use inrange(VAR,MIN,MAX)==1 to condition on MIN<=VAR<=MAX
A very pro #StataTip:
You can split & stack your dofiles in tabbed windows. Just drag a dofile to the left of the dofile editor and click "New vertical tab group"
This is highly useful for parallel updating or comparing multiple files, and makes the workflow easier.
A #StataTip: If you are repeatedly using the same set of commands, for example for graphs or regressions, then:
1) start using macros, and/or
2) define small programs
This saves you:
(a) space, and
(b) the hassle of copy/pasting
and looks neater!
A #Statatip that I rediscovered while updating this article: you can change whether your graphs are tabbed or not. Graphs popping up in separate windows makes life so much easier when comparing stuff:
All you need to do is "set autotabgraphs off"
---
RT @asjadnaqvi
A #Statatip: If you r making multiple graphs & want to keep them on the screen, name them. This will ensure that they all stay open. Without names, the newer replaces the o…
https://twitter.com/AsjadNaqvi/status/1449038966272008193