Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Everyone develops their own approach to organizing analysis files and differences across investigators can pose a challenge for collaborators co-authoring code. Nonetheless, each project will have a similar set of scripts. These will likely include scripts to a) extract variables, b) create new variables, and c) analyze data and d) produce tables. It is useful to have a main do file that calls and executes each set of scripts in order. 

...

2)  Setup files that each person can identify the location of each type of directory in their file structureWe give a bit more detail on how this works hereADD MORE SPECIFICS.

3)        A main do file that executes project do files in orderscript that begins with loading original data and ends by producing publication-ready tables. Note that you should nest do files scripts within other do filesscripts. For example, you might have a one stata .do file that executes all of the code to create your analysis files and another . Another do file could to execute all the scripts to do the data analysis. The main do file would call and execute both.

4)        A system of logging the state of the computer when it ran the analysis, the set of steps to produce the results, and the results.5)      Code produces tables with the results you report. Certainly don’t type results into a table from a stata results window, but it's also not ideal to cut and paste. (See automate)

We are also developing techniques to automate the production of tables for publication. See automate for more.