When writing a lot of do-files during a research process it is hard to keep track of what a do-file was for, what it needs in terms of input, and what it generates in terms of output. Especially, if you get your paper back from the (journal) referees with comments what you should change, and want to re-run some part of the analysis — a year after you have done it –, it is hard to remember exactly what you need to do.
I use a preamble in my do-files to document (somewhat) this information, but also to set a couple of standard pointers that make my work easier …
Posted by Didier
This illustrates ways to make a tables of descriptives (mean or something else) for many variables (say wage, tenure, education, …) and several groups (say males and female). Neither summarize or tabstat are useful if the variables are many. With summarize, you would need to cut, paste and edit the output in e.g. Excel. With tabstat, the tabel would be too wide. Continue reading
The following command can be used to generate a command which consists of several new variables which are generated within a loop.
This could either be done by (e.g. generating a number of log variables)
gen newvar1 = log(var1) Continue reading
gen newvar2 = log(var2)