You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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 produce tables. It is useful to have a main do file that calls and executes each set of scripts in order. 

To facilitate collaboration and archival of analysis for replication by non-project members, we have developed a set of conventions.

1)  README.txt. Within our main code directory, we have a file called README.txt with basic information anyone needs to know to get started on the project. 

2)  Setup files that each person can identify the location of each type of directory in their file structure.  We give a bit more detail on how this works here.

3)      A main do file that executes project do files in order. Note that you should nest do files within other do files. For example, you might have a do file that executes all of the code to create your analysis files. Another do file could 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)

  • No labels