6 Open Code

Authors should provide program code, scripts, codebooks, and other documentation sufficient to precisely reproduce all published results.

If research code is entirely secondary, it should be cited rather than shared directly (see Section 7). However, this is likely to be rare, and research code that is modified in any way from the original should be both cited and shared.

Refer authors to Section 15.1 for tips and resources to make code open.

If not all data needed to run the code can be shared, encourage authors to include simulated or redacted data so that the code can be tested by others. R packages such as synthpop, faux, and simstudy can facilitate this. Faux also has a web-based interface for simulating data from factorial designs (and soon for multilevel designs).

6.1 Checklist

  • Does the TOP statement have the correct link to a publicly accessible version of the code? (or a statement that code is not available or N/A)
  • Is there evidence (e.g., author statement, CodeCheck confirmation, or editorial check) that the code contains all components needed to run?
  • Is the code clearly licensed for reuse? (see Appendix B)
  • Is the code hosted on a persistent archive? (see Appendix C)