Skip to content

Help and FAQ's

Anderson Park edited this page Sep 5, 2018 · 18 revisions

General Tips

  • Remember to push your changes often, especially if you are stuck; if someone can download and run the code you are working with, it is much easier for them to spot and resolve the errors you're running into.

  • If you are on a windows environment, in general make sure that your file paths use forward slashes (“/”), not back slashes (“\”). Windows will automatically give you paths that use back slashes, you must change them. Also, put quotes around your paths.

  • Before running any code always be sure to scroll through the main (.do) (.m) (.R) file and look at the comments. Sometimes authors provide instructions on how to run the programs in these comments (instead of in the ReadMe). Sometimes there will be sections that you will need to manually comment out in order to run. And sometimes the author will make a mistake and accidentally comment out a line or section that shouldn’t be commented out.

  • When you finish the replication process, complete the exit questionnaire and add a line at the end of REPLICATION.txt that says "Exit questionnaire submitted".

Debugging

  • Commenting out code is also a useful tool for when you run into an error that you don’t know how to fix but you know is also not important to fix for replication purposes (such as with line colors or other graph aesthetics). In these cases the best option may be to just comment out the line of code.

  • Commenting out sections of code may also be useful for when you run into an error that is important to fix for replication purposes but you don’t know how.

  • Be sure that the code that you comment out does not affect the rest of the results (as a general rule of thumb it is okay to comment out sections for specific graphs and tables but not sections devoted to data cleaning).

FAQ's

When I try to run a program, Stata/Matlab/etc. gives me an error that it cannot find “data.file”?

Make sure that “data.file” is in the same folder or directory as the program you are trying to run. Otherwise, you may need to use the "change directory" command to point your software to the directory containing “data.file”. Note that "data.file" would be contained in the directory “file” in this example:

Stata/Matlab:

cd “C:/local/directory/containing/data/file”  

For other packages, look for the relevant documentation.

I accidentally deleted a directory from the repository. What do I do?

  1. Show the repo at the pre-deletion revision number (say, we deleted in revision 2, so look at revision 1)
  2. Copy the deleted directory from previous revision (revision 1) into the current repository state
  3. Verify the log message to ensure that the right directory was "restored"
  4. Show the repo at its current state.

The directory should be back. If not, talk to Flavio or Lars about it. If you make a bad change in the remote repository, it takes effect immediately. Fix it immediately as well.

Entry/Exit Questionnaire questions

See the Questionnaires page

Stata-specific questions

See the Stata page

R-specific questions

See the R page

Matlab-specific questions

See the Matlab page

Clone this wiki locally