Skip to main content
Log in

A survey of experimental stimulus presentation code sharing in major areas of psychology

  • Original Manuscript
  • Published:
Behavior Research Methods Aims and scope Submit manuscript

Abstract

Computer code plays a vital role in modern science, from the conception and design of experiments through to final data analyses. Open sharing of code has been widely discussed as being advantageous to the scientific process, allowing experiments to be more easily replicated, helping with error detection, and reducing wasted effort and resources. In the case of psychology, the code used to present stimuli is a fundamental component of many experiments. It is not known, however, the degree to which researchers are sharing this type of code. To estimate this, we conducted a survey of 400 psychology papers published between 2016 and 2021, identifying those working with the open-source tools Psychtoolbox and PsychoPy that openly share stimulus presentation code. For those that did, we established if it would run following download and also appraised the code’s usability in terms of style and documentation. It was found that only 8.4% of papers shared stimulus code, compared to 17.9% sharing analysis code and 31.7% sharing data. Of shared code, 70% ran directly or after minor corrections. For code that did not run, the main error was missing dependencies (66.7%). The usability of the code was moderate, with low levels of code annotation and minimal documentation provided. These results suggest that stimulus presentation code sharing lags behind other forms of code and data sharing, potentially due to less emphasis on such code in open-science discussions and in journal policies. The results also highlight a need for improved documentation to maximize code utility.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

Availability of data and materials

The data and code used to conduct this analysis are available at https://osf.io/ka9ws/.

Code availability

Not applicable

References

Download references

Acknowledgements

The authors thank Dr. Gabriele Bellucci for their constructive remarks on the manuscript.

Funding

This work was supported by grants to NWD from the Taiwan Ministry of Science and Technology (108-2410-H-038-008-MY2; 110-2628-H-038-001-MY4). The work was also supported by the Taiwan Ministry of Education Higher Education Sprout Project.

Author information

Authors and Affiliations

Authors

Contributions

AR: Conceptualization, Formal Analysis, Investigation, Methodology, Visualization, Writing - original draft;

VT: Conceptualization, Formal Analysis, Investigation, Methodology, Visualization, Writing - original draft;

YHL: Investigation, Methodology, Writing - review & editing;

LYT: Investigation, Methodology, Writing - review & editing;

NWD: Conceptualization, Methodology, Visualization, Writing - original draft.

Corresponding author

Correspondence to Niall W. Duncan.

Ethics declarations

Conflict of interest/Competing interests

The authors declare no conflicts of interest.

Ethics approval

Not applicable

Consent to participate

Not applicable

Consent for publication

Not applicable

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Below is the link to the electronic supplementary material.

Supplementary file 1 (pdf 334 KB)

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Rawal, A., Truong, V., Lo, YH. et al. A survey of experimental stimulus presentation code sharing in major areas of psychology. Behav Res (2024). https://doi.org/10.3758/s13428-024-02390-8

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.3758/s13428-024-02390-8

Keywords

Navigation